BUG: SQLNumResultCols Returns Zero for the pcCol Argument
ID: Q135989
|
The information in this article applies to:
-
Microsoft Open Database Connectivity, version 2.5
SYMPTOMS
When you use the ODBC 32-bit 2.50.0121 SQL Server driver along with the
2.50.3006 Cursor Library, SQLNumResultCols returns zero for the
number of columns in the result set.
This problem occurs only when the hstmt is in a positioned state.
STATUS
Microsoft has confirmed this to be a problem in the 2.50.3006 version of
the cursor library. We are researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
The following steps reproduce the problem:
- In the database, Create table test(col1 int, col2 char(10))
- insert test values(10,'Unchanged')
Then, use ODBC Test:
- Set connect option to use the cursor library. Allocate two statements,
hstmt1 and hstmt2. On hstmt1, set the cursor type to 'Static',
concurrency to 'Values', and cursor name to 'c1'.
- Do a SQLPrepare on hstmt1 and "select * from test for update of col2".
Execute this statement. SQLNumResultCols at this point returns a
correct value. Do a SQLFreeStmt with SQL_CLOSE option. Execute hstmt1
again. Do a SQLExtendedFetch.
- On hstmt2, do a SQLExecDirect on "update blow set col2='Changed' where
current of c1".
- On hstmt1, call SQLNumResultCols again. It returns zero.
Since SQLNumResultCols is called on hstmt1 and not hstmt2,
SQLNumResultCols should not be returning 0.
Additional query words:
mfc sql
Keywords : kbprg SSrvProg kbbug2.50.3006
Version : WINDOWS:2.5
Platform : WINDOWS
Issue type :
|