Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> commit statement
Hi, I have a "C" program with some embedded SQL in it. I am compiling the program with ORACLES Pro*C Compiler. The program is designed to delete a large amount of rows from a table within the ORACLE database. To do this, I declare a cursor (outside of the loop) and fetch each row from the database then I delete it. This all happens within a for loop. The problem is this, I have a counter set up that when it reaches 20 I will issue a commit statement which is also within the loop. The problem is every time I issue the commit the cursor is closed. I can't stick the commit statement outside of the for loop because I don't want to commit a large amount of work from the delete to ORACLE all at once. By having the commit inside the for loop I can delete and commit say 20 at a time. The question is, how do I issue a commit without it closing the cursor. I must delete(commit) only 20 at a time.
Regards,
Edward Received on Fri Mar 16 2001 - 18:48:44 CST
![]() |
![]() |