homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Abort PL/SQL procedures
I don't want to go back....

WebmasterWorld Senior Member 10+ Year Member

Msg#: 3012102 posted 8:04 pm on Jul 17, 2006 (gmt 0)

I've got the following:

Procedure A calls procedure B which calls procedure C. Normally, when procedure C ends, processing returns to the next statement in procedure B; when B ends, you go to the next step in procedure A.

What I want to do eliminate the backtracking in a particular instance. That is, when the end of procedure C is reached, I don't want to go back through B and A.

This would sort of be the procedural equivalent of an EXIT statement for a LOOP.

A little more detail: A is a web login screen, which calls B which determines where the user will end up based on his/her role, which is determined by C. What I want do is have a condition in C for a particular role which will go to an entirely different web page. I don't want that user to see anything that A or B would display after C ends.

I've tried redirects (which in one case worked in Firefox but not Internet Explorer), creating exceptions, etc., but haven't had any luck.

It seems like it should be an easy thing to do, but the solution is doing a good job of eluding me so far.

Thanks in advance for any help offered.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 3012102 posted 4:41 pm on Jul 18, 2006 (gmt 0)

I would do it like this -

A shouldnt call B as a procedure call but as a transfer or httppost, as it doesnt need to return to A unless it fails.

Define C to return only -1,1,2,3 etc..1 number for each role and -1 for invalid login.

B receives one of those values and runs a server redirect inside a switch/case, with -1 transfering back to A.

Use the "if this page doesnt tredirect..." line and write the link to handle meta-refresh being disabled.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 3012102 posted 8:02 pm on Jul 18, 2006 (gmt 0)

Thanks for the reply aspdaddy.

The issue is that I'm not building this from the ground up. The code I'm working on is part of an existing system, and I need to keep the changes to a minimum (it already takes us a couple of days to reapply all of our local changes when a new upgrade come along).

It almost seems like that in the entire history of Oracle, no one has ever needed to break out of the normal propagation of control of "sub-procedures" back up through the calling procs. But so far my searches have been fruitless.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved