[freetds] ODBC scrollable cursors in 0.65
Sebastien FLAESCH
sf at 4js.com
Mon Dec 17 05:39:46 EST 2007
Frediano,
On the 12/13 you wrote that scrollable cursors are supported in 0.65:
ZIGLIO, Frediano, VF-IT wrote:
>> - No scrollable cursors??? (this is very old stuff - now?)
> Are supported by CVS. Currently we are next to a release (we hope).
Is this committed?
Attached a little ODBC sample using a scrollable cursor.
Tested with SQL Native Client (SQL Server 2005).
Output gives:
-------------------------------------------------------------------------
>> fetch 3 0 : 3 [ccc ]
>> fetch 4 0 : 2 [bbb ]
>> fetch 4 0 : 1 [aaa ]
>> fetch 4 0 : no data found
>> fetch 1 0 : 1 [aaa ]
>> fetch 1 0 : 2 [bbb ]
>> fetch 1 0 : 3 [ccc ]
>> fetch 1 0 : no data found
>> fetch 2 0 : 1 [aaa ]
>> fetch 1 0 : 2 [bbb ]
>> fetch 1 0 : 3 [ccc ]
>> fetch 5 3 : 3 [ccc ]
>> fetch 6 -2 : 1 [aaa ]
>> fetch 6 -2 : no data found
>> fetch 6 5 : no data found
-------------------------------------------------------------------------
But with FreeTDS 0.65, I get this:
Error -1 at: SQLFetchScroll
Diagnostic info:
SQL State: HY106
SQL code : 0
Message : [FreeTDS][SQL Server]Fetch type out of range
Using SQL_CURSOR_STATIC does not help:
SQLSetStmtAttr(m_hstmt2, SQL_ATTR_CURSOR_TYPE, (SQLPOINTER) SQL_CURSOR_STATIC, 0);
Am I using the correct version?
Did I miss something?
Thank you.
Seb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odbctest14.c
Type: text/x-csrc
Size: 6777 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20071217/5d48f6d2/attachment.bin
More information about the FreeTDS
mailing list