‎2007 Sep 21 9:20 AM
Hello,
I have some problems..maybe you have suggestions...
I fill some internal table in a loop, which is included in an open cursor ...close cursor instruction.
Outside the loop, but in the same open cursor ...close cursor instruction, I move the records from the internal table into a database table.
Now..the purpose is to write a commit work to obtain the best performance.
I want that commit work to follow the insert into database table , but the cursor looses its index.
So I want to find a way to work with cursor and commit.
Please help .
Thank you.
‎2007 Sep 21 9:41 AM
hello Anda,
There is no way by which you can write commit work inside OPEN CURSOR.
wat i will suggest is either use select statement and then COMMIT or COMMIT after close cursor.;
‎2007 Sep 21 9:30 AM
insert into dbtab statement automatically uses commit and i think there is no need to use explicit commit work.
‎2007 Sep 21 9:33 AM
hii
pls try commit work and wait
it may helps but it is synchronous process
‎2007 Sep 21 9:41 AM
hello Anda,
There is no way by which you can write commit work inside OPEN CURSOR.
wat i will suggest is either use select statement and then COMMIT or COMMIT after close cursor.;
‎2007 Sep 21 9:48 AM
Hi Anda,
Please check the following extract on "Commit" command..maybe you can be more clear on the work of the command
COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORK results in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK.
Regards
Byju
‎2007 Sep 21 9:54 AM
Hi byju,
Open Cursor can be used after COMMIT WORK.
If the cursor you are opening is another one.
‎2007 Sep 21 9:52 AM