The information in this article applies to:
SYMPTOMSCalling SQLNumResultCols after SQLPrepare of a SELECT statement that contains a subquery in the select list will fail with:
CAUSEWhen the SQL Server ODBC driver constructs the T-SQL statement that will be sent to the server to resolve the number of columns that will be returned in the resultset, it incorrectly parses the initial query and excludes the final table name. For example:
This results in the following statement being sent to the server on the
call to SQLNumResultCols:
Hence, causing SQL Server to report "Incorrect syntax near the Keyword
'SET'."
WORKAROUNDWhere possible convert the offending query to a SQL Server VIEW. STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server ODBC Driver version 2.65.0201. This problem was corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider. Additional query words: 6.50 sp1
Keywords : |
Last Reviewed: August 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |