Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Calling a PL/SQL Block from PowerBuilder 5.0.01

Re: Calling a PL/SQL Block from PowerBuilder 5.0.01

From: Bruce Armstrong <barmstro_at_mail.gte.net>
Date: 1997/03/11
Message-ID: <3324f2af.1596335@news.gte.net>#1/1

Amy & Tim <madsen_at_capital.net> 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?

You use embedded SQL. Something along the lines of:

string ls_command

ls_command = "SET ROLE " + as_rolename

EXECUTE IMMEDIATE :ls_command ;

If you are using the PFC, there is a function on n_tr that will invoke a SQL string for you.

Bruce Armstrong				| Source Consulting
mailto:barmstro_at_mail.gte.net		| mailto:jobs_at_sourcela.com
http://home1.gte.net/barmstro/		| http://www.sourcela.com

Preach the gospel at all times.If necessary, use words.	[Francis of Assisi]
Received on Tue Mar 11 1997 - 00:00:00 CST

Original text of this message

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