Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ora-01000 maximum open cursors exceeded

Status
Not open for further replies.

yytan

Programmer
Joined
May 8, 2002
Messages
113
Location
MY
hi there;

i am getting this error, may i know how to solve it?

--java.sql.SQLException: ORA-01000: maximum open cursors exceeded --

for you information, my resultset structure are look like this:

<%
rs = connect.execSQL(&quot;SELECT * FROM keyword WHERE keyword like '%&quot;+ simpkeyword +&quot;%' &quot;);
while(rs.next()) {
knumb = rs.getString(&quot;number&quot;);

rs2 = connect.execSQL(&quot;SELECT * FROM invmarc where nbr = &quot;+knumb+&quot; &quot;);
while(rs2.next()) {
callnbr = rs2.getString(&quot;callnumber&quot;);
%>

<tr><td bgcolor=&quot;#0066FF&quot; width=&quot;25%&quot;><font face=&quot;Helvetica&quot; size=&quot;-1&quot; color=&quot;#FFFF00&quot;><b><%= callnbr %></b></font></td>

<% } //while for rs2
rs2.close();
} //while for rs
if (rs!=null) rs.close(); %>

 
Place your SQL calls in a try-catch-finally block and make sure you close them in the finally. Basically the error you are getting means SQL statements are being started but never closed, over time these acculmulate and eventually Oracle starts to complain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top