Use SET ROLE in Oracle Forms Builder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MEG

    Use SET ROLE in Oracle Forms Builder

    Hi,

    I am trying to do some authentificatio n in a form and have run into a
    problem. The user types the usename/password into a couple of fields and
    presses the login button.

    The button trigger PL/SQL looks like this :

    DECLARE
    uservar VARCHAR2(15) := '';
    passvar VARCHAR2(15) := '';
    BEGIN
    /* grab the data */
    uservar := :BLOCK10.USERNA ME_BOX;
    passvar := :BLOCK10.PASSWO RD_BOX;

    set role uservar identified by passvar;

    /* if OK change context, etc... */



    When I try compile I get the message :

    Error 103 at line 9, column 6
    Encountered the symbol "ROLE" when expecting one of the following:

    transaction <a SQL statement>


    Anyone know what the problem is? All hints greatly appreciated.

    Thanks,

    Mike.

    --
    _______________ _______________ ___
    There are only 10 types of people in the world -
    those who understand binary, and those who don't.
  • Pete's

    #2
    Re: Use SET ROLE in Oracle Forms Builder

    MEG <burnunit@DROPT HIS.hotmail.com wrote in message news:<Xns94149D 3B0E45Egililsme govnsca@198.164 .200.20>...
    Hi,
    >
    I am trying to do some authentificatio n in a form and have run into a
    problem. The user types the usename/password into a couple of fields and
    presses the login button.
    >
    The button trigger PL/SQL looks like this :
    >
    DECLARE
    uservar VARCHAR2(15) := '';
    passvar VARCHAR2(15) := '';
    BEGIN
    /* grab the data */
    uservar := :BLOCK10.USERNA ME_BOX;
    passvar := :BLOCK10.PASSWO RD_BOX;
    >
    set role uservar identified by passvar;
    >
    /* if OK change context, etc... */
    >
    >
    >
    When I try compile I get the message :
    >
    Error 103 at line 9, column 6
    Encountered the symbol "ROLE" when expecting one of the following:
    >
    transaction <a SQL statement>
    >
    >
    Anyone know what the problem is? All hints greatly appreciated.
    >
    Thanks,
    >
    Mike.

    If I remember correctly, you can not issue a set role directly in
    Oracle Forms as you have coded it. For Forms, Oracle has provided a
    function to do this. If I recall correctly, it is 'set_role'. Try
    checking out the help on this.

    HTH,
    Pete's

    The opinions I may have stated here are mine and not that of my
    employer. Use any advice given at your own risk.

    Comment

    Working...