JDBC Cursor help

Stephanie Lewis slewis at thinweb.com
Fri Sep 8 13:46:23 EDT 2000

Just looking for some advice,

             The current JDBC FreeTds driver does not have any cursor
support. Just to see what is returned, I've tried test queries like:

rs = stmt.executeQuery("DECLARE cursor1 CURSOR FOR SELECT FirstName FROM
Employees OPEN cursor1 FETCH NEXT FROM cursor1");

expecting a result set containing the first row. When examining the
return packet, all I get is a TDS_END_TOKEN and nothing more. I've also
played with:

rs = stmt.executeQuery("declare @P1 int set @P1=NULL sp_cursoropen @P1
output, 'select FirstName from Employees', 8, 1, 1 Select @P1");

to see if I could get a handle on the cursor returned but again to no
avail. I realize I should not be using sp_cursoropen directly from my
app but have seen it used in other drivers.

Any direction in cursor manipulation would be great,


Using:   SQL Server 7.0 on NT Server
            Tds 7.0 on NT Workstation
            FreeTds Aug.12/00 snapshot

More information about the FreeTDS mailing list