Skip to Main Content
  • Questions
  • using DBMS_LOCK.SLEEP with OWA_UTIL.REDIRECT_URL

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Gerry.

Asked: April 18, 2011 - 10:43 am UTC

Last updated: April 18, 2011 - 12:21 pm UTC

Version: 10.2.0.5

Viewed 1000+ times

You Asked

Hello Tom,

I have developed a web page that allows the user to input data. The process checks the validity of that information and after 3 attempts if not valid a message is displayed indicating that they are about to be redirected to another page.

The problem: After displaying (htp.p) the message, I want it to be presented for 5 seconds, so I call the dbms_lock.sleep(5), issue a htp.init and then issue a owa_util.redirect_url to the page. Results: user sees the delay occur and the page is presented. However, the message indicating you are about to be redirected is not.

It appears that the logic for the sleep occurs PRIOR to the display (htp.p) by commenting the lines that issue the htp.init and owa_util.redirect_url and running the application.

Is there a way to do this? I am thinking of building a html page that would then perform it after a refresh but was wondering if there is something easier.

Thanks

Gerry

and Tom said...

You would build a single HTML page with something like this:

<head>
<meta http-equiv="refresh" content="5; URL=xxxx.html">
</head>

to tell the page to refresh to the specified page.


A user doesn't get to see your page produced by htp.p calls until your stored procedure completely finishes.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library