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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why update SQL in procedure did not commit?

Re: Why update SQL in procedure did not commit?

From: Justin Cave <jcave_at_cableone.net>
Date: Wed, 4 Dec 2002 22:46:52 -0700
Message-ID: <uutqes1uorql97@corp.supernews.com>

"C Chang" <cschang_at_maxinter.net> wrote in message news:3DEEE0DA.5B4B_at_maxinter.net...
> I have an ASP page calling a procedure of a package to update records.
> The procedure has structure like following
>

<< Snip >>
>
> In turn the UPDATE requests_view triggers a trigger doing the actual
> Updating a new error_msg. Even I received the updated message as
> p_advMsg on web page, when I query the same orderID again, the record
> still retains the pre-updated error msg. I have to put in the
> recObj.CommitTrans from ASP to commit, where recObj is the recordSet
> object of ASP. Is that when a procedure finish it task at database
> side, all the SQL schemes are supposed to be committed? My database is
> 8i on NT 4 box. Can anyone explain why?

Data is certainly *not* committed when a PL/SQL stored procedure completes. Oracle requres that you do an explicit commit when your transaction is logically complete. As I understand your explanation, this is exactly what's happening.

ADO, by default, will autocommit. That is, whenever you issue a successful SQL statement, it will tell Oracle to commit it. If you do a BeginTrans, however, you will turn off this autocommit behavior & you'll have to manage your own transactions.

Justin Cave Received on Wed Dec 04 2002 - 23:46:52 CST

Original text of this message

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