Page 1 of 1

Routine to execute Update statment

Posted: Wed Jul 13, 2005 9:31 am
by elavenil
Hi DS Gurus,

Have written a routine to execute an update statement in Oracle 9i. SQLPlus utility is called from the routine and it looked the update command was successful when i execute the routine. When i checked the data, the data in the database not at all updated.

Is there any SQLPlus switch available to enable auto commit ON?

Can you someone enlighten me what is causing this issue.

Thanks in advance for your help.

Regards
Saravanan

Posted: Wed Jul 13, 2005 10:43 am
by Sainath.Srinivasan
Set AutoCommit ON/OFF

Posted: Wed Jul 13, 2005 11:20 am
by elavenil
Hi Sainath,

Thanks for your reply.

How do i set that autocommit is ON for that session? When i execute that statement from that routine that call is considered as a session, so autocommit is to be set to that particular session.

Pls let me know how to set that while running that update command.

Regards
Saravanan

Posted: Wed Jul 13, 2005 10:01 pm
by ashwin2912
Try this SQL in your routine

Code: Select all

set autocommit on/off

Posted: Wed Jul 13, 2005 11:42 pm
by Sreenivasulu
HI,

Put "Set AutoCommit On" before the sql statement. This would help in applying for the current session.

Regards
Sreeni

Posted: Fri Jul 15, 2005 2:50 am
by elavenil
Thanks for your input. I will try setting 'Autocommit' property as you suggessted. I shall post the results.

Regards
Saravanan