File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Connections that won't close Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connections that won Watch "Connections that won New topic
Author

Connections that won't close

prem saggar
Ranch Hand

Joined: Aug 24, 2000
Posts: 66
Hello everyone. I've got an interesting problem. When I try to close a Database Connection to a connection pool I'm using, I get an "Invalid Cursor" exception, and I'm not able to close the connection! Any help is greatly appreciated. I've seen "Invalid Cursor" exceptions before, but never to strictly close a Connection! For all kind readers, I tried to keep the post short, but if you need any more information, just let me know and I'll respond quickly. Thank you for all your time.
arnel nicolas
Ranch Hand

Joined: Dec 16, 2003
Posts: 149
Hi prem,

what database are you using? I got the same error for MS SQL. What i did is to add "SelectMethod=Cursor" in the URL connection of my JDBC config. I got this info from the MS site.
[ July 30, 2004: Message edited by: arnel nicolas ]
prem saggar
Ranch Hand

Joined: Aug 24, 2000
Posts: 66
Thanks Arnel. I'm using Oracle 9i here. Changing your DB parameter fixed this? We are so confused on this one.
prem saggar
Ranch Hand

Joined: Aug 24, 2000
Posts: 66
Oh by the way Arnel, what do you mean by the URL connection of my JDBC config? Is that the string you pass to DriverManager.getConnection(String url)? Could you give me an example of what you did? Thanks so much, Prem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connections that won't close