FFI, ODBC and mysterious crashes

Simon Kirk Simon.Kirk at pinesoft.co.uk
Mon Nov 7 11:27:29 UTC 2005


Don't panic :) -3 is the ODBC API constant for a null-terminated string 
(SQL_NTS) - so it's perfectly valid - it just makes the driver manager 
(and/or driver) read the string values being sent up until the first 
null terminator character (and for the record I did check in gdb that 
all the strings had the required null termination character - they all 
did). I did wonder whether I should explain that when I posted, and 
forgot to mention it. Ahem. I did try the call with a fixed-length 
description as well (ie putting the real lengths in instead of using the 
SQL_NTS constant) but it made no difference.

Cees De Groot wrote:

>On 11/7/05, Simon Kirk <Simon.Kirk at pinesoft.co.uk> wrote:
>  
>
>>#8  0x777b6931 in __throw () from /usr/lib/libstdc++-libc6.2-2.so.3
>>#9  0x77815155 in SQLConnect () from /opt/cache/bin/libcachecurrent.so
>>#10 0x7794755a in SQLConnect (connection_handle=0x815edc8,
>>    
>>
>server_name=0x8161758 "Samples", name_length1=-3, user_name=0x81602b0
>"foo", name_length2=-3, authentication=0x81602c0 "bar", name_length3=-3)
>   at SQLConnect.c:3825
>
>*minus* 3 in these lengths? If that's correct and I were an ODBC
>driver, I'd quit as well...
>
>
>
> 
>  
>


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051107/8736d860/attachment.htm


More information about the Squeak-dev mailing list