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

Home -> Community -> Usenet -> c.d.o.server -> Re: Store Procedure Help

Re: Store Procedure Help

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 10 Jan 2003 23:13:38 GMT
Message-ID: <CsIT9.1480$Bj.87662804@newssvr21.news.prodigy.com>


Aaron Rouse wrote:
> Thanks for the help and that is correct on the MAX() function is not
> needed. That query was originally given to me in the spec and today I
> noticed it was unneeded. I had tried the fetch in one form or another
> yesterday, I honestly can not remember if it was a exact copy in
> syntax as was shown, regardless it would end up erroring out. The
> method that did end up working for me is this:
>

[snip code]

Just one caveat, Aaron. I don't know who will be calling your procedure, but with all those COMMIT statements, they might have a problem.

Suppose their development design is such:

  1. Display data in a form.
  2. Let user modify data in form.
  3. Call your stored procedure.
  4. Commit if OK button pressed; Rollback if Cancel button pressed.

Well, a COMMIT is global ... when you commit in Step 3, you negate the user's ability to rollback in Step 4. This can be corrected by making your procedure an autonomous transaction - which just commits what's in the transaction (your procedure stuff) and leaves the user's data on the form alone. Received on Fri Jan 10 2003 - 17:13:38 CST

Original text of this message

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