[freetds] Invalid cursor state when executing 2 SELECTstatements
Sebastien FLAESCH
sf at 4js.com
Thu Jan 3 09:09:31 EST 2008
Hi all and happy new year.
Just started to play again with the latest snapshot.
I believe there is a problem when binding SQL_C_TYPE_TIMESTAMP + SQL_TYPE_TIMESTAMP parameters.
Looking at the SQL Profiler output, I see that values are enclosed in duplicated quotes:
''2008-01-03 00:00:00.000''
I guess it should be:
'2008-01-03 00:00:00.000'
Attached an ODBC sample to reproduce.
Note that even if the '' duplicated quotes are replaced by a singular quote, I still get an error
when executed the sp_cursoropen text by hand (copied from the Profiler output):
Msg 137, Level 15. State 2, Line 1
Must declare the scalar variable "@P1".
Note also that SQL_TYPE_TIMESTAMP params must be bound with a precision of 23 with SQL Server ODBC.
See example.
Yours,
Seb
James K. Lowden wrote:
> ZIGLIO, Frediano, VF-IT wrote:
>>> First, thanks a lot for looking at this cursor issue!
>>>
>> I just committed a patch to CVS... all tests you sent me are
>> incorporated and working as expected!
>
> Hooray! I think I can see the fireworks from here. Nice work, and quick!
>
>
> Sebastien, please let us hear back from you as to how well the current
> snapshot works for you. I feel a release coming on.
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odbctest3.c
Type: text/x-csrc
Size: 5049 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20080103/3ac5632d/attachment.bin
More information about the FreeTDS
mailing list