More specifically. To the previous question. The following query always gives (for me) -1 (SQL_ERROR). If the field is of type char, nchar, ... image. If the query is not parametric (explicit setting of the field value), then everything is fine. <?> driver version different, not <?> , But another character for the request? What's wrong?

 SQLCHAR SQL[]= "INSERT INTO Foto (Image) VALUES(?)"; sr = SQLExecDirect(hstmt, SQL, SQL_NTS); 

I fight for a decision week, please help!

    1 answer 1

    Add the SQLGetDiagRec call to the code, in the case when SQLExecDirect returns SQL_ERROR , and print its value to the log. The MessageText parameter will contain the error text.

    • Calling SQLGetDiagRec in this case gives SQL_NO_DATA! - Anjei