Re: Query When Forms App Starts

From: Sarah Sikes <sikes_at_erols.com>
Date: 1998/02/13
Message-ID: <34e3a8fd.10566543_at_news.erols.com>#1/1


Ed Jennings <jenningse_at_mindspring.com> wrote:

>I want to include a SQL statement in the beginning of my FORMS
>app that will select the user's role from USER_ROLE_PRIVS,
>and store it in a global variable. I can then use this variable
>throughout my app to selectively enable/disable various features
>and functions. I tried to put it in the PRE-FORM trigger, but
>it wouldn't compile. Can someone point me in the right direction?
>

Need more information... What is the compile error?

A pre_form trigger should work. Try the following:

Declare

   Role_cnt number := 0;
Begin
  Select count(*) into Role_cnt from sys.user_role_privs;   If Role_cnt = 1 then

     Select granted_role into :global.usr_role from

                sys.user_role_privs;

  else if
    .... rest of code < need to handle multiple rows etc >   end if;
End; Received on Fri Feb 13 1998 - 00:00:00 CET

Original text of this message