Re: JDBC and ResultSet problem

From: Alin Sinpalean (alin_at_earthling.net)
Date: 03/15/05


Date: 15 Mar 2005 02:23:42 -0800


Silvio Bierman wrote:
> I should have mentioned this problem occurred with an older version
of the
> jTDS driver. I have been following your advances and know that you
have
> solved that problem in the current versions.

No problem. I just wanted to let everybody else know about this.

> I would like a configuration level property of specifying that I want
server
> side cursor, changing the code to scrollable resultsets is not
acceptable
> for me since I do not need them and don't know what other databases
might do
> when I specify such cursor attributes.
>
> Is it not possible to change default read cursors to be server side
by
> specifying this in the connect-string. If so I would probably not
hesitate
> to switch back to the jTDS driver (using the MS-driver now).

It would be possible to have a parameter to specify whether forward
only server side cursors should be used instead of firehose cursors
(i.e. direct execution). The reason that hasn't been done before is
that we did not see a real need for it; why would anyone want to use a
connection to retrieve a ResultSet and do something else at the same
time? And why couldn't this be achieved using two connections? Or a
single connection but processing the ResultSet first and doing the
other operations afterwards?

[BTW, this behavior is fully supported by jTDS now, only it is done by
caching the ResultSet to memory/disk when another request is submitted
instead of creating a server side cursor. It's just a different
approach.]

There is one other request with a good explanation of why fast forward
only cursors would be the right choice for this on the jTDS Help forum:
https://sourceforge.net/forum/forum.php?thread_id=1246387&forum_id=104389

It still doesn't have a good explanation of why this would be needed,
other than "we have a very complicated application layer that needs
this", but if you really-really need this, please submit a RFE (request
for enhancement) for jTDS here:
https://sourceforge.net/tracker/?group_id=33291&atid=407765

Alin,
The jTDS Project.



Relevant Pages

  • Re: SelectMethod=cursor and SelectMethod=direct
    ... > We use prepared statements only, one per connection and we don't use ... After processing a resultset the prepared statement is ... such as jTDS (disclaimer: ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: JDBC and ResultSet problem
    ... >> jTDS driver. ... >> Is it not possible to change default read cursors to be server side ... > connection to retrieve a ResultSet and do something else at the same ...
    (comp.lang.java.databases)
  • Re: JDBC and ResultSet problem
    ... > FROM CUSTOMERS ORDER BY CUSTOMER_REVENUE DESC ... cursors, where all the rows are cached _in memory_ by the driver. ... behavior you need (see the current implementation of jTDS). ... One more thing you could take into consideration is that SQL Server ...
    (comp.lang.java.databases)
  • Re: JDBC and ResultSet problem
    ... Oracle doesn't support server side cursors at all as far as ... > behavior you need (see the current implementation of jTDS). ... Silvio Bierman ...
    (comp.lang.java.databases)
  • Optimizing performance
    ... We are currently evaluating MS JDBC against jTDS and i-net Una regarding performance. ... Connection conn; ... Statement stmt; ...
    (microsoft.public.sqlserver.jdbcdriver)