Article View: borland.public.jbuilder.java.language
Article #15807Re: maximum open cursors exceeded
From: Michael Härtig
Date: Fri, 30 Apr 1999 00:00
Date: Fri, 30 Apr 1999 00:00
38 lines
1749 bytes
1749 bytes
Hi
> I get the " ORA-01000: maximum open cursors exceeded" SQLException error. My
> program executes queries. I think I am not closing either my STATEMENTS or
> my RESULTSETS...
You are right. If an exception is thrown the Statement or ResultSet will
not be closed.
Try this:
try{
Statement s = ....;
s.close(); //The normal way
}
catch(SQLException e){
try{
s.close(); //Close the Statement if an Exception is thrown
}
catch(SQLException e2){
}
//Your error code here...
}
Michael
--
////
(o o)
+-----ooO--(_)--Ooo---------------------------------------+
| |
| Michael H�rtig Neumann & Partner |
| Informationssysteme GmbH |
| Softwareentwicklung An der Hohen Stra�e 1 |
| 08393 Meerane |
| |
+------------Oooo-----------------------------------------+
oooO ( )
( ) (_)
(_)
Technical Details
Message-ID:
<3729C177.47C77A53@nupis.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7ga1a3$o7a37@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,4438f6cf8ce327cf X-Google-Attributes: gidf74b3,public From: Michael Härtig <haertig@nupis.de> Subject: Re: maximum open cursors exceeded Date: 1999/04/30 Message-ID: <3729C177.47C77A53@nupis.de> X-Deja-AN: 472702480 Content-Transfer-Encoding: 8bit References: <7ga1a3$o7a37@forums.borland.com> X-Accept-Language: de Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language