Re: NEED HELP! Return code from dynamic query in Form 4.5

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: Thu, 16 Sep 1999 16:36:23 GMT
Message-ID: <b09E3.3$dB1.605_at_nntp.csufresno.edu>


In article <7rqmu7$saj$1_at_news1.mpx.com.au>, Jack <jack_han_at_optusnet.com.au> wrote:
>Hi,
>
>I want to run a DYNAMIC query that may have syntax errors or can not run
>successfully for some reasons. How can I pass the query to Oracle and get
>error code and error message from Oracle (like: table xxx not exists) in
>Form 4.5?

You must use the Oracle dynamic SQL package, DBMS_SQL. The best way is to create a stored procedure that executes your query, and call the sp from the form, passing the query to the procedure, and returning the results back to the form.

For an example of a dynamic sql procedure, look up Thomas Kytes 'execute_immediate' procedure on Deja.com.

Steve Cosner Received on Thu Sep 16 1999 - 18:36:23 CEST

Original text of this message