specific user login

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marsguy85
    New Member
    • Oct 2006
    • 27

    specific user login

    user | lines |
    a ---- current , last
    b ----- current , last
    c ----- current , last
    d ----- current , last
    z ----- default ( all four line )

    fields :
    current --- id,time,custome r ... blah blah blah
    last --- same as above

    the form which has all the details of 8 lines called CURRENT/LAST


    Now i have a form which shows me all 8 records i.e current and last for a,b,c,d.
    BUT i can only see this if i log in as z . because this is a default user when i open a main form .
    the button which calls the form CURRENT/LAST is called current .
    the code on this button is simple

    call_form('curr ent.fmx',hide,d o_replace,no_qu ery_only);

    now the problem is , i have other buttons also on the main form page , so for ex

    i click a button called COILS with user a . i can see the appropriate form , when i log out and click on the form CURRENT/LAST , then i open the form as user a but i want to be logged into as user z always .

    i need to put a log in command on the button CURRENT ,so that irrespective of user , when ever i click on the button to open the form CURRENT/LAST , i always log in as user z .

    a login command on button CURRENT ,so that when i click it , i always log in as z . and so the form will open properly .

    In short how to log in as a specific user when a button is clicked .


    I USED THE BELOW CODE ON LOGON TRIGGER , is this the way ?
    declare
    uname varchar2(10);
    pass varchar2(10);
    begin
    uname := 'sap';
    pass := 'steady';
    logon(uname, pass || '@ass');
    end;



    KINDLY HELP ME OUT PLZ !

    CHEERS
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Originally posted by marsguy85
    user | lines |
    a ---- current , last
    b ----- current , last
    c ----- current , last
    d ----- current , last
    z ----- default ( all four line )

    fields :
    current --- id,time,custome r ... blah blah blah
    last --- same as above

    the form which has all the details of 8 lines called CURRENT/LAST


    Now i have a form which shows me all 8 records i.e current and last for a,b,c,d.
    BUT i can only see this if i log in as z . because this is a default user when i open a main form .
    the button which calls the form CURRENT/LAST is called current .
    the code on this button is simple

    call_form('curr ent.fmx',hide,d o_replace,no_qu ery_only);

    now the problem is , i have other buttons also on the main form page , so for ex

    i click a button called COILS with user a . i can see the appropriate form , when i log out and click on the form CURRENT/LAST , then i open the form as user a but i want to be logged into as user z always .

    i need to put a log in command on the button CURRENT ,so that irrespective of user , when ever i click on the button to open the form CURRENT/LAST , i always log in as user z .

    a login command on button CURRENT ,so that when i click it , i always log in as z . and so the form will open properly .

    In short how to log in as a specific user when a button is clicked .


    I USED THE BELOW CODE ON LOGON TRIGGER , is this the way ?
    declare
    uname varchar2(10);
    pass varchar2(10);
    begin
    uname := 'sap';
    pass := 'steady';
    logon(uname, pass || '@ass');
    end;



    KINDLY HELP ME OUT PLZ !

    CHEERS
    Is your above code working properly?

    I would suggest you to use PRE-LOGON trigger or PRE-FORM trigger. So before the form gets loaded when called using call_form or GO Form_Name, in PRE-FORM trigger you could set the User/pwd to default and use that for logging in to the current form

    Comment

    • marsguy85
      New Member
      • Oct 2006
      • 27

      #3
      Nope it dint work .
      Any other idea please?

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Originally posted by marsguy85
        Nope it dint work .
        Any other idea please?
        Try using PRE-FORM or PRE-LOGON trigger as I have suggessted above

        Comment

        Working...