The SQLDescribeCol command returns metadata for the last statement from the batch when executed on a prepared batch of SQL statements (884315)
The information in this article applies to:
- Microsoft ODBC Driver for SQL Server 2.5
SYMPTOMSYou receive the metadata for the last SQL statement from a batch of SQL statements when you run the SQLDescribeCol command on the prepared batch of SQL statements in the ODBC Test tool.CAUSEThe ODBC driver overwrites the column information in the buffer. Therefore, the metadata is retrieved only for the last SQL statement from a prepared batch of SQL statements.RESOLUTIONTo resolve this problem, follow these steps to execute the prepared batch of SQL statements before running the SQLDescribeCol command. - Start ODBC Test.
- Prepare the batch statement.
- On the Stmt menu, click SQLExecute.
- In the SQLExecute dialog box, click OK.
- On the Results menu, click SQLDescribeCol.
- In the SQLDescribeCol dialog box, click OK to see the result of first statement in the prepared batch statement.
- On the Results menu, click SQLMoreResults.
- In the SQLMoreResults dialog box, click OK.
- On the Results menu, click SQLDescribeCol.
- In the SQLDescribeCol dialog box, click OK to see the next result.
REFERENCESFor more information about the ODBC Test tool, visit the following Microsoft Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 9/9/2004 |
---|
Keywords: | kbServer kbScript kbInput kbDLL kbDatabase kbtshoot kbprb KB884315 kbAudDeveloper |
---|
|