Article ID: 113146
Article Last Modified on 7/27/2001
APPLIES TO
- Microsoft Open Database Connectivity 1.0
This article was previously published under Q113146
BUG# ODBCSDK2: 2309 (1.02.3231)
SYMPTOMS
Calling any of the API's (SQLNumResultCols, SQLDescribeCol or SQLColAttributes), after executing a SELECT INTO statement with SQLExecDirect, will cause the SQL Server driver to return SQL_ERROR instead of SQL_SUCCESS. If you call SQLError, you will get the following:
For example:
- Set up a SQL Server data source.
- Log onto this SQL Server and use the pubs database.
- SQLExecDirect: select * into test from authors. It returns SQL_SUCCESS.
- Now call SQLNumResultCols. This will return *pcCol = -1 and a return code of SQL_ERROR.Calling SQLError yields: SQLNumResultCols should actually return SQL_SUCCESS with *pcCol=0. Calling SQLDescribeCol (to describe any column) or SQLColAttributes (for any column) will cause the same behavior.
WORKAROUND
Use the SQL Server driver versions prior to 1.02.3231. The problem does not occur in these earlier versions.
STATUS
Microsoft has confirmed this to be a problem in the SQL Server Driver version 1.02.3231. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: 1.02.3231 ODBC
Keywords: kbbug KB113146