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 -> "SET ROLE" in stored procedure

"SET ROLE" in stored procedure

From: <engsys_at_merlion.singnet.com.sg>
Date: 1997/07/30
Message-ID: <5rm93e$kng$1@columbine.singnet.com.sg>#1/1

Hello again,

I created a stored procedure as follows :

> create or replace procedure set_my_role as
> i Number;
> j Number;
> Begin
> i:=dbms_sql.open_cursor;
> dbms_sql.parse(i,'SET ROLE MY_ROLE',dbms_sql.native);
> j:=dbms_sql.execute(i);
> dbms_sql.close_cursor(j);
> End;

When i try to call this procedure from PRO*C program using

        > EXEC SQL
        > BEGIN
        >     SET_MY_ROLE
        > END;
        > END-EXEC;
and in forms 3.0 trigger
        > BEGIN
        >       SET_MY_ROLE
        > END;

I get an error

> -6565 ORA-06565: cannot execute SET ROLE from within stored procedure

So I tried to set a role in PROC*C as

        EXEC SQL SET ROLE MY_ROLE;
This works fine. But in Forms 3.0 This does not work. Is there a way out. I am using Oracle 7.3 and Aix 4.1 with PRO*C 2.0 and Forms 3.0

Thanks for spending your time.

Regards,

P Lakshmi Prasad Received on Wed Jul 30 1997 - 00:00:00 CDT

Original text of this message

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