[freetds] issue with prepared statement queries from a Mac OS X client to SQL Server 2005
Nick Davis
nick.davis at vidoop.com
Mon Oct 13 19:43:42 EDT 2008
Heheh, sorry about that. Here's the entire log, with the machine data
sanitized.
-Nick
James K. Lowden wrote:
> Nick Davis wrote:
>
>> I'm using FreeTDS 0.82 on a Mac OS X Leopard machine to run some
>> prepared statements against our SQL Server 2005 database. The query
>> with the issue is:
>>
>> SELECT COUNT(*) from tbl WHERE tbl_id = ?
>>
>> Whenever I run the application, I receive the following error with the
>> query:
>>
>> SQLSTATE = 420000
>> Native Error Code = 402
>> [FreeTDS][SQL Server]The data types varchar and text are incompatible in
>>
>> the equal to operator.
>>
>> However, tbl_id is of type VARCHAR(36) in the database, not TEXT.
>>
>> I've attached a relevant section of the freetds dump file that may help
>>
>
> Please post more of the log file, at least the last 1000 lines and the
> first 100. The part you posted was the server's error message (hey, I
> believed you!) but what I'm interested in is how the query and parameter
> data are sent to the server.
>
> IIRC there's some gnarly code in the driver to divine the parameter
> datatype. It might get yours wrong.
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: freetds.log
Url: http://lists.ibiblio.org/pipermail/freetds/attachments/20081013/3cd0575a/attachment-0001.bat
More information about the FreeTDS
mailing list