Article ID: 294875 - Last Review: February 23, 2007 - Revision: 5.3 FIX: SQLTables() Function Returns No Data for SQL Server Database Names That Contain UnderscoreThis article was previously published under Q294875 On This PageSYMPTOMS
Calling the ODBC API SQLTables() function on a SQL Server database name that contains an underscore (for example, "my_db") may not return any of the table names contained in the database.
When you use MDAC 2.7 SP1, and you call SQLTables with a server-side cursor, you may receive the following error message: DIAG [24000] [Microsoft][ODBC SQL Server Driver]Invalid cursor state (0) CAUSESQLTables() calls the SQL Server sp_tableswc system stored procedure. This stored procedure returns the table names requested by the function call, but incorrectly filters out database names that contain the underscore. The filter does not return any data for tables of databases with the underscore in the name.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
300635
(http://support.microsoft.com/kb/300635/EN-US/
)
INFO: How to Obtain the Latest MDAC 2.6 Service Pack
HotfixThe English version of this fix should have the following file attributes or later:Date Time Version Size File name Platform ------------------------------------------------------------- 03/27/01 12:22P 8.00.375 733KB Instcat.sql all To install Instcat.sql in your SQL Server server, follow these steps:
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1. APPLIES TO
| Article Translations
|
Back to the top
