[freetds] 0.63 bug - error messages garbled

Frediano Ziglio freddyz77 at tin.it
Sun Aug 14 05:14:10 EDT 2005


Il giorno gio, 11/08/2005 alle 11.26 -0700, Evan Rempel ha scritto:
> Thanks for the suggestions. The logs are a little difficult fo me to read.
> It appears that ODBC does not get the error message back from the TDS 
> driver
> 
> [ODBC][20729][SQLPrepare.c][364]
>  		Exit:[SQL_ERROR]
> [ODBC][20729][SQLError.c][342]
>  		Entry:
>  			Statement = 0x896cb28
>  			SQLState = 0xbfffa870
>  			Native = 0xbfffa848
>  			Message Text = 0xbfffa880
>  			Buffer Length = 511
>  			Text Len Ptr = 0xbfffa84e
> [ODBC][20729][SQLError.c][379]
>  		Exit:[SQL_NO_DATA]
> 
> I have included both logs for both unixODBC and for freetds when
> using freetds 0.62.4 which is successful, and freetds 0.63 which is 
> unsuccessful.
> 
> Evan.
> 

There seems a couple of problems here
- FreeTDS do not catch error preparing statement
- your program do not check SQLError result
- FreeTDS try to execute invalid prepared statement

I fix first error. Attached post 0.63 patch

freddy77

-------------- next part --------------
A non-text attachment was scrubbed...
Name: post63.diff.gz
Type: application/x-gzip
Size: 6346 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20050814/e06ad9e1/post63.diff.bin


More information about the FreeTDS mailing list