Re: Pro*C and Roles

From: Tony Damon <bfntd_at_aimnet.com>
Date: 1996/01/25
Message-ID: <4e8rtg$rei_at_news2.aimnet.com>#1/1


Jim Ward (jfw_at_radix.net) wrote:
: Does anyone know if it is possible to set a role using Pro*C?
: The following code below fails...
:
: /*----------------------------------------------------*/
: exec sql begin declare section;
: VARCHAR myrole[20];
: exec sql end declare section;
:
: .. some C code ...
:
: strcpy(myrole.arr, "adpi");
: myrole.len = strlen(myrole.arr);
:
: exec sql set role :myrole;

I know it works without the host variable.

exec sql set role adpi identified by xyz end-exec;

I'm not the one coding our C stuff so I can't test it with a host variable.

You may also be able to set it by executing the dbms_session.set_role(role_cmd varchar2) procedure. HTH

Tony Damon Received on Thu Jan 25 1996 - 00:00:00 CET

Original text of this message