[freetds] Supporting fast forward-only cursors?
sf at 4js.com
Thu Jan 10 08:57:06 EST 2008
So far I have one remaining "FIXME" comment in my FreeTDS driver interface, regarding fast forward cursors...
With the native MSSQL ODBC drivers, when you set:
r = SQLSetStmtAttr(st->stmtHandle, SQL_SOPT_SS_CURSOR_OPTIONS, (SQLPOINTER) SQL_CO_FFO, SQL_IS_UINTEGER);
You get fast forward-only cursors, as described in:
Note this is a SQL Server 2000 feature...
I was wondering how difficult it would be to support this MSSQL specific statement attribute...
If it's just a matter of sp_cursoroption, then you should...
Attached a sample (must compile with -D USE_FAST_FOWARD to use FFO cursor)
I noticed that SQL Profiler should different values in the @p5 and @p6 parameters of the sp_cursorprepexec() call:
With SQL_NONSCROLLABLE / SQL_SENSITIVE:
Tested with SQL Server 2005 ...
More information about the FreeTDS