[unixODBC-dev] HY003 error

Nick Gorham nick at lurcher.org
Thu Oct 23 12:24:07 BST 2008


Tony Khalil wrote:

>Hi Nick,
>
>Thank you for your reply. You are right with what you said, in the trace
>file I have the following:
>[ODBC][25164][SQLBindCol.c][222]
>		Entry:            
>			Statement = 0x83c13d0            
>			Column Number = 1            
>			Target Type = 12 SQL_VARCHAR            
>			Target Value = 0x83c1350            
>			Buffer Length = 50            
>			StrLen Or Ind = (nil)
>[ODBC][25164][SQLBindCol.c][282]Error: HY003
>
>The field type in the database is a varchar. How can I make the correct
>binding.
>
>Thank you in advance.
>
>  
>
Ok, well, if you have the source to the acc making the (or the library) 
you can change the SQL_VARCHAR to a SQL_C_CHAR which is the correct 
value, other than that, you could patch the driver manager in 
SQLBindCol.c to change a SQL_VARCHAR to a SQL_C_CHAR. You could try 
adding it to the list of valid types, but the driver may then hav a 
issue with it.

If you get a copy of the 2.2.13pre unixODBC code, I will send you a 
tweeked copy of SQLBindCol.c that should do what you want.

-- 
Nick


More information about the unixODBC-dev mailing list