Microsoft KB Archive/195080

{|
 * width="100%"|

BUG: Wrong Rowset Size Returned by ODBC Driver Manager

 * }

Q195080

-

The information in this article applies to:


 * Microsoft SQL Server version 6.5
 * Microsoft Open Database Connectivity, versions 2.x, 3.0, 3.6
 * Microsoft Data Access Components version 2.5

-

SYMPTOMS
When the SQLGetStmtOption (in ODBC 2.x) or SQLGetStmtAttr API (in ODBC 3.0 or 3.6) is used to get the maximum rowset size with the ODBC 3.0 or 3.6 Driver Manager, the wrong value is returned. SQL State 01S02 is returned while the rowset size is specified initially.

CAUSE
The Driver Manager caches the initial value that was submitted as the rowset size. Instead of returning the corrected rowset size, the Driver Manager sends back the cached value.

WORKAROUND
To work around this problem, use the ODBC version 3.60.00.3103 or later. This bug has been fixed in that version of the ODBC driver.

STATUS
Microsoft has confirmed this to be a problem in the ODBC driver versions 2.x, 3.0, and 3.6.

This problem has been corrected in ODBC version 3.60.00.3103 and later.

MORE INFORMATION
According to the ODBC specifications, when the size of the rowset specified by the client exceeds the maximum permitted value for a data source, the driver substitutes the maximum permitted value as the rowset size and returns the SQL State 01S02. The SQLGetStmtOption (in ODBC 2.x) or SQLGetStmtAttr API (in ODBC 3.0 or 3.6) is used to get the rowset size. The ODBC 3.0 or 3.6 Driver Manager returns the wrong rowset size.

This problem has also been reproduced with the Microsoft Oracle driver Msorcl32.dll version 2.73.7356. All the other Microsoft ODBC drivers allow the rowset size to be equal to the maximum value for the data type used to store the rowsetsize.

Additional query words: max datatype row set datasource

Keywords : kbODBC351bug odbcAPI odbcDrivermgr kbMDAC250bug

Issue type : kbbug

Technology :