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: Calling a PL/SQL Block from PowerBuilder 5.0.01

Re: Calling a PL/SQL Block from PowerBuilder 5.0.01

From: Eric Wuillai <ewuillai_at_hol.fr>
Date: 1997/03/12
Message-ID: <33268D75.5BB4@hol.fr>#1/1

Amy & Tim wrote:
>
> We are using PB 5.0.01 against Oracle 7.2.
>
> We wish to use the Oracle SetRole package method to change
> a user's role upon login to our application for purposes
> of granting priviliges and thus ensuring database security.
>
> SetRole cannot be invoked from a stored procedure, but it can
> be invoked from a PL/SQL block.
>
> How can we call an anonymous PL/SQL block from a PowerBuilder
> application?
>
> Please send replies to
>
> David.Yeselavage_at_Budget.Mailnet.State.NY.US
>
> Thanks.

You can execute a PL/SQL block using dynamic SQL. If you do not have input or output parameters, you should use format 1 (see documentation for the different formats).

Exemple :

   string l_request

   l_request = "BEGIN ; <PL/SQL instructions...> ; END ;"

   EXECUTE IMMEDIATE :l_request USING sqlca ;    if ( sqlca.SQLCode < 0 ) then

      <error>
   end if

Eric Received on Wed Mar 12 1997 - 00:00:00 CST

Original text of this message

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