I have a database tool with the possibility to suppress the use of SqlSetPos
. According to the documentation, some databases are not fully compatible with this function. How can I check if my database is compatible with this function or not?
-
Have you tried reading what the manual says about compatibility issues with this function?– Andriy MJan 23, 2017 at 15:10
-
Depends which manual you are referring to. If it is the ODBC driver manual, then I have read some, but it is not really making sense.– NiclasJan 23, 2017 at 15:21
1 Answer
You'll need to check the documentation for the specific ODBC driver you are using. I would expect the SqlSetPos function to return SQL_ERROR or SQL_SUCESS_WITH_INFO if the driver doesn't support (or partially supports) the function. In that case, a subsequent call to SQLGetDiagRec should return a SQLSTATE with the error/warning cause, such as IM001 (Driver does not support this function). See the SQLSetPos function reference for details.
-
Thanks for your reply. How would you try to make the SqlSetPos return anything? I am using the standard ODBC driver for SQL Server: SQLSRV32.DLL (version 6.01.7601.17514)– NiclasJan 23, 2017 at 13:05
-
The "SQL Server" ODBC driver included with Windows WDAC is legacy. The stand-alone "ODBC Driver 13 for SQL Server" should be used instead (microsoft.com/en-us/download/details.aspx?id=50420). I would still expect the old driver to work but you'll need to use your database tool or custom code to test the function if you don't read the driver documentation. Jan 23, 2017 at 13:16
-
I will look into this, thanks! Do you know if the Driver 13 supports SqlSetPos?– NiclasJan 23, 2017 at 13:21
-
I would expect it to since SetPos is part of the ODBC 1.0 conformance. Jan 23, 2017 at 13:29