Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> commit statement

commit statement

From: Edward Horky <ejjh4527_at_home.com>
Date: Sat, 17 Mar 2001 00:48:44 GMT
Message-ID: <3AB2B31C.E0D68E51@home.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US