Wednesday, April 1, 2009

STMT:00 [24000][0] [Microsoft][ODBC SQL Server Driver]Invalid cursor state SqlTables

568/2876 Mon Aug 22 13:14:15.101 Jdbodbc.c5229
ODB0000163 - wSQLFetch failure. rc=-1

1568/2876 Mon Aug 22 13:14:15.101 Jdbodbc.c5229
ODB0000164 - STMT:00 [24000][0] [Microsoft][ODBC SQL Server Driver]Invalid cursor state

1568/2876 Mon Aug 22 13:14:15.116 Jdb_drvm.c1566
JDB9900189 - Failed to verify that table exists in Business Data - TEST

This will happen when you use a newer ODBC driver against an earlier version of SQL Server.This might specifically happen when the tablename or database contain underscore character(_).
Per the document[], to ensure a proper operation of sql server ODBC driver, you must use the Instcat.sql script that comes with your new version of SQL Server to upgrade the catalog stored procedures on the earlier version of SQL Server. For example, when running the SQL Server version 7.0 ODBC driver against SQL Server 6.5, you must run the SQL Server 7.0 version of Instcat.sql against SQL Server 6.5.

Ways to run:
1] C:> ISQL -Usa -Psa_password -Sserver_name -ilocation\Instcat.sql
or
2] Log on to Query Analyzer[isqlw] as 'sa'
use File->Open to load the instcat.sql script and run the script.Make sure the 'master' database is active.

No comments: