Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calling a PL/SQL Block from PowerBuilder 5.0.01
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
![]() |
![]() |