Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01000: maximum open cursors exceeded
Oliver Neumann wrote:
> Hi Thomas,
>
> > You have to make sure, you do close all ResultSets and all Statements
> > (even more important, as every Statement maps to a cursor on the server
> > side)
>
> ah right. Thats the point...i hadnt this problem yet due the auto-close and
> i didnt added a larger amount of rows at once yet so the auto.close worked
> fine till now. Looks good now...the script is able to run without problems
> now.
>
>
> Thanks guys for the help,
> oliver
Looks like you've solved the root problem, but just as a pointer on your code.. you don't need a separate statement to get the next seq. num. Just include it in your INSERT statement:
INSERT INTO employees
VALUES (employees_seq.nextval,
'John', 'Doe', 'jdoe', '555-1212', TO_DATE(SYSDATE) );Received on Fri Jun 16 2006 - 15:27:16 CDT