[freetds] SQL_SUCCESS_WITH[out]_INFO in ODBC lib

James K. Lowden jklowden at freetds.org
Thu Apr 10 17:11:54 EDT 2008


Nathan Bird wrote:
> Reading data in chunks with SQLGetData if the buffer is not long enough 
> for the value to copy, it should fill the buffer, and return 
> SQL_SUCCESS_WITH_INFO, along with setting the StrLen_or_IndPtr to point 
> at the how much data is available. At least according to  
> http://msdn2.microsoft.com/en-us/library//ms715441.aspx [1] the info 
> should be "01004" to indicate the string is right truncated-- this isn't
> 
> being set right now.

The attached patch implements the change you suggest, along with a few
cosmetic changes.  

I committed the change to to CVS HEAD.  I'll apply it to 0.82 before it's
released unless Frediano sees a problem.  

(My compliments, if I may, on a fine problem report.  Thanks.)  

> I ran into a problem recently where trying to read data through the ODBC
> 
> lib gave me a number of problems, updating to 0.82RC4 fixed most of 
> them....

Very good to hear, too.  

> From my searching this was the most definitive source for ODBC spec 
> I could find

That's what I use.  I figure ODBC for SQL Server is whatever Microsoft
says it is, standard or no.  

Regards, 

--jkl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQLGetData.diff
Type: application/octet-stream
Size: 2750 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20080410/e40db1e3/attachment.obj 


More information about the FreeTDS mailing list