SQL 2008 SQLBindCol SQL_C_DOUBLE bug

This is a discussion on SQL 2008 SQLBindCol SQL_C_DOUBLE bug within the sqlserver-odbc forums in Microsoft SQL Server category; There seems to be a bug in the new SQL2008 ODBC driver where if you call SQLBindCol on a numeric column binding as SQL_C_DOUBLE the fetch call fails with an error: [Microsoft][SQL Server Native Client 10.0]Numeric value out of range If the BufferLength parameter is 0 the fetch fails. When BufferLength is set to 8 (size of a double) the fetch succeeds. According to the MS documentation BufferLength should be ignored for fixed length data. From the MS ODBC documentation: When the driver returns fixed-length data, such as an integer or a date structure, the driver ...

Go Back   Database Forum > Microsoft SQL Server > sqlserver-odbc

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-14-2008, 07:36 PM
Default SQL 2008 SQLBindCol SQL_C_DOUBLE bug

There seems to be a bug in the new SQL2008 ODBC driver where if you call
SQLBindCol on a numeric column binding as SQL_C_DOUBLE the fetch call fails
with an error: "[Microsoft][SQL Server Native Client 10.0]Numeric value out
of range"

If the BufferLength parameter is 0 the fetch fails.
When BufferLength is set to 8 (size of a double) the fetch succeeds.

According to the MS documentation BufferLength should be ignored for fixed
length data. From the MS ODBC documentation:

"When the driver returns fixed-length data, such as an integer or a date
structure, the driver ignores BufferLength and assumes the buffer is large
enough to hold the data. It is therefore important for the application to
allocate a large enough buffer for fixed-length data or the driver will write
past the end of the buffer. "

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 05:04 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.