Wednesday, March 28, 2012

Microsoft SQL Server 2000 JDBC Driver issue

I was wondering if anybody has run into the following problem with ms's
jdbc driver. We're using cursors in our app - when we create a
java.sql.Statement object in the app, we're indicating that we want the
corresponding ResultSet object to have a TYPE_FORWARD_ONLY cursor.
We've noticed when we do this that if the app executes a query with
'UNION's in it, it never gets a ResultSet back from the server (I've
noticed on the SQL server profiler that it stays stuck doing the 'exec
sp_cursoropen' call). If we change the resultSetType to
TYPE_SCROLL_INSENSITIVE then the query returns in no time.
Any ideas?
Thanks.
--Yogesh
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
joe wrote:

> I was wondering if anybody has run into the following problem with ms's
> jdbc driver. We're using cursors in our app - when we create a
> java.sql.Statement object in the app, we're indicating that we want the
> corresponding ResultSet object to have a TYPE_FORWARD_ONLY cursor.
> We've noticed when we do this that if the app executes a query with
> 'UNION's in it, it never gets a ResultSet back from the server (I've
> noticed on the SQL server profiler that it stays stuck doing the 'exec
> sp_cursoropen' call). If we change the resultSetType to
> TYPE_SCROLL_INSENSITIVE then the query returns in no time.
If you can show an example of your code, it'll help.
If you do a trivial query like "select * from sysdatabases UNION select * from sysdatabases"
that hangs?
thanks
Joe

> Any ideas?
> Thanks.
> --Yogesh
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
sql

No comments:

Post a Comment