Results 1 to 8 of 8

Thread: F8 :(

  1. #1
    Join Date
    Feb 2004
    Location
    marc
    Posts
    13

    Question Unanswered: F8 :(

    hii

    colud u plz help me with this:

    i would like to disable F8, as you know F8 excute the query i want to disable this facility

    some tell me to use key-F8 trigger where it dose not work others told me use key-others trigger

    i thought key-others trigger will work

    but i want the code how can i said to the trigger it is F8 key not other key when i made this ok key-others trigger

    message('hi');
    message('hi');
    and build the form then when i run it i found when i press any key it show this message eveen i can't close the form or do any other thing every time i press eny key it shows hi message

    then i though i have to write code that make the trigger knows when it is F8 desable it work when it is other just
    do_key('');
    and action

    by the way am not expert on this so plz give as detail as u can

    thank u so much


  2. #2
    Join Date
    Jan 2004
    Posts
    492

    Re: F8 :(

    Are you talking about Oracle Forms? Or TOAD?

    Im not really clear on why you want to disable F8 in the first place? Its not like you can be hitting it that often by mistake?

    Please tell what database and Product version you are trying to do this on.

  3. #3
    Join Date
    Feb 2004
    Location
    marc
    Posts
    13
    thank u ss659

    am talking about oracle forms6i

    why do i need to disable F8 ?

    we have at our orgnization HR programs based on oracle forms6i the producer company make it with out any type of pervilges so when u just open the main form screen you can have full access over the program .

    and that was HRD requrment and now the like to change this i told him we don't have to go deep to data level and i will make it on the GUI it is work fine yet i have to disable some key like F8, F7 so on so when i disable the query button for such user he can't use F8 to overrid the disable button

    i hope i explain cleary

    i try to use key-others triggir the problem with this trigger it is fire when u pressed any button and it disable other buttons fucntion like when i try to exit it is prevent me

    so what i think it is a selution with this trigger is how i can make it fire when press F8 or how can i make this trigger work normaly if it is not F8 button an disable F8 .

    can u suggest an answer plz

    thanks u in advance

  4. #4
    Join Date
    Feb 2004
    Posts
    108
    Create a form level trigger - key-exeqry.
    The code in this trigger will be executed whenever "do-key execute-query" is triggered.
    If you want to disable it, simple write NULL in this trigger.

    But be aware, if you try to execute do_key(exeqry), it wont' work as you have disabled it.

  5. #5
    Join Date
    Feb 2004
    Location
    marc
    Posts
    13
    thanks pinakdb for help

    key-exeqry works fine when i want to disable query

    i wrote this into my trigger

    IF :GLOBEL.V_QYERY = 0 THEN
    NULL;
    END IF;

    if i like to disable query it is work fine

    :GLOBEL.V_QYERY = 0 this is mean user don't have the right to query data

    but unfortunitly even the user have the right he can't query

    so i change the code to


    IF :GLOBEL.V_QYERY = 0 THEN
    NULL;
    ELSE
    DO_KEY('EXECUTE_QUERY');
    END IF;

    i thought the prevoiuse code shuold work fine but it is work when u don't have right to query
    but if u have the write to query data then it is just hang on and i have to close the form using ctrl+alt+del so i don't know

    how can i make work fine

    thanks for ur time

  6. #6
    Join Date
    Feb 2004
    Posts
    108
    Replace
    DO_KEY('EXECUTE_QUERY');

    with
    EXECUTE_QUERY ;

  7. #7
    Join Date
    Feb 2004
    Location
    marc
    Posts
    13
    thanks so much pinakdb

    i will try later but i find other solution for this problem could u advice me which is better


    i write on-select trigger on form level i wrote this code

    IF :GLOBAL.v_query = 0 THEN
    ABORT_QUERY;
    ELSE
    Select_Records;
    END IF;

    so which is better to use this one or

    IF :GLOBEL.V_QYERY = 0 THEN
    NULL;
    ELSE
    EXECUTE_QUERY;
    END IF;

    i mean for performance or it dose not matter ?

  8. #8
    Join Date
    Feb 2004
    Posts
    108
    Well, as per oracle/forms documentation for On-Select trigger :
    "use this trigger when you are retrieving data from a non-ORACLE data source. "
    This trigger overrides the default processing.
    I would suggest the first method, with "select_records ; " would be safe !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •