Execute_query after enter_query

i want to filter the results obtained on execute_query
for that i wrote a trigger on a button:
When-button-pressed
enter_query();
:ename:='WARD';
execute_query();
but i am stuck at enter query mode and not proceeding
there is one one data block emp
i am using forms 6i
Edited by: 875107 on Jul 26, 2011 5:16 AM
Edited by: 875107 on Jul 26, 2011 5:16 AM

Hi,
The ONETIME_WHERE is the keyword using in 10g. In 6i, you have to use DEFAULT_WHERE. So change the line to
set_block_property('<block_name>', DEFAULT_WHERE, 'ENAME = ''WARD''');And if the WARD is from an item in a block, then write
set_block_property('<block_name>', DEFAULT_WHERE, 'ENAME = ''' || :<block_name>.<item_name> || '''');Hope this helps,
Regards,
Manu.
Edited by: Manu. on Jul 26, 2011 3:59 PM

Similar Messages

  • Execute_query after LOV

    Dear Experts,
    i want to use execute_query after selecting value from lov so that the record appear in edit mode and i can get the functionality of editing record. what should i do?

    a block manually and set database property to YES
    Correct.. database property is set to yes to accept retrieving the data u want to retrieve from the detail block.
    data source name sis_registration data source name sis_registration[b] NOoo no data souce it's set to NULL
    create an item with the the same field name as i have already created
    yes but don't take copy from the detail block cause this is only a text item that will copy the value u entered to the detail one to retrieve the query..!
    FRM-30047: Cannot resolve item reference :MSTRBLK.ITEM10FRM-30047: Cannot resolve item reference %s.
    Cause:     The item referenced does not exist.
    Action:     Change the reference or create the item.
    Off course it's not existing in the table of sis_registration as u referenced in the Master block where u set >data source name to sis_registration
    i am sorry as i am new to Oracle Forms I were like u no boady starts from the top,one day u will be able to solve same problem and others in this forum but u should first pass through it.
    i am happy to help..!
    Regards,
    Abdetu..

  • Invoke execute_query after an on-update trigger

    Hi there,
    i try to do an execute_query after an on-update trigger.
    The trigger can't do this. When, and with wich trigger can i make the block to 'refresh'??
    Thanx in advance.
    Edwin Smal

    Hello,
    ON-UPDATE trigger fires in the validation process (commit)
    put the execute_query after the commit_form (which is placed in a KEY-COMMIT trigger)
    Francois

  • Set_item_property after enter_query.

    Hello,
    How can i update properties of items after the enter_query command.
    When i try :
    set_item_property(......)
    enter_query;
    it doesn't work, because the enter_query makes a clear_block which set all the properties to default.
    when i try :
    enter_query;
    set_item_property(.....)
    it doesn't work, the programs stops after the enter_query command and the set_item_property is not done....
    thanks.

    Hi there,
    After you set the visible property, you need to set 2 other properties:
    set_item_property('<block>.<item>', enable, property_true);
    set_item_property('<block>.<item>', navigable, property_true);
    Hope this helps!

  • Execute_query after on-insert trigger

    Hello.
    I use on-insert trigger to insert data into database and then i want to execute_query so i can see all records including the last one i inserted.
    How can i workaround the problem with using execute_query or go_item in (or after) on-insert trigger?
    Thanks.

    Hi,
    you cannot execute navigational or query built-ins when in a transaction control point (ON-INSERT).
    ON-, KEY triggers replace the functionality of the events they fire upon.
    You can use the KEY-COMMIT Trigger to do this. For instance:
    <<KEY-COMMIT>>
    Commit_Form; -- all validation triggers are fired
    -- WHEN SUCCESSFUL
    Go_Block ('BLOCK_NAME');
    Execute_Query;
    Go_Block ('STARTING_BLOCK_NAME');
    -- END KEY-COMMIT
    Regargds,
    Hans

  • Go_block doesn't wait after execute query.

    Hi All,
    I have an issue with go_block and execute query sequence. I have a code
    snippet which is in a program unit called form key-exeqry trigger. As per
    the expected behaviour the cursor should wait on the block for user input.
    But it just shows the block with the details and moves to the next code
    after execute-query. I added few debug messages in when-new-block-instance
    and pre-query triggers for the block, but none of them get executed.
    This block is being displayed through an another flow and there it waits .
    Please help!!
    Thanks in advance
    Ashok
    if l_cnt >0 then
    message('condition matched');pause;
         l_where := 'acct_no = 1114';
         go_block('sel_acct');
         clear_block(no_validate);
    set_block_property('sel_acct',DEFAULT_WHERE,l_where);
    execute_query;
         message('after sel_acct');pause;

    > As per the expected behaviour the cursor should wait on the block for user input.
    You are confusing Enter_Query with Execute_Query.
    If you change your Execute_Query to Enter_Query, the process will stop and allow the user to enter query values. However, your next line,
    message('after sel_acct');pause;
    will never execute.
    But, you should NOT code the Enter_Query command in a process called by Key-Exeqry, since the user needs to press Key-Exeqry after he enters query values. Your process above should be initiated by a Key_EntQry trigger instead.

  • Problem with webutil library in Forms 11g debug (FRM-93652)

    Hi.
    I have a problem when debug a forms in OFM11g, that used.
    the problem is that the forms, in debug mode, raise the error FRM-93652. Only in debug mode.
    I add tha jacob.jar and jacob.dll in the folder ORACLE_HOME/forms/java and Oracle_home/forms/webutil.
    the classpath variable in default.env, has added the jacob.jar file, and in my FORMS_BUILDER_CLASSSPATH Registry variable.
    Can some one help me???.
    Thanks and sorry for my english

    I have the same issue with debug_messages in Forms 11g -- they will not appear. I can, however, run in debug mode and attach the session to Forms Builder 10.1.2.0.2. Thus, when I run in debug mode and check the the Command Line tab under Global/System Variables, DEBUG_MESSAGES is always set to NO regardless of how I set it on the command line. Still works fine in our 10gR2 instances.
    DB 11.1.0.7
    Forms 11.1.1.4
    WebLogic 10.3.4
    AIX 5.3 64-bit
    AIX Java 1.6.0 SR9 FP1
    Client: WinXP JRE 1.6.0_25
    My real issue has to do with a FRM-40734 on EXIT_FORM after ENTER_QUERY or EXECUTE_QUERY have caused the KEY-EXEQRY trigger to erroneously fire -- especially when DO_KEY is involved -- but that's a different and much more problematic story.

  • How can I create a loop in a multi-record block (on the background)

    I have a multi-record block.
    In one item I change a value.
    Upon this change, in the when-validate-item I would like to
    change other records in the same block.
    I planned to loop the block with go_record and to do my things
    in each record. Unfortunately the go_record built-in is
    restricted and cannot be used in a wvi-trigger.
    Another approach can be to update the records in the database
    and to perform an execute_query after this change. Also this
    procedure cannot be used in a wvi.
    How can I easily loop in a multi-record block???

    You can try to put loop with go_record in KEY-NEXT-ITEM on that
    field.
    Or if you change something and then press KEY-COMMIT you can
    update another records in database and after commit do again
    execute_query. Something like :
    on KEY-COMMIT:
    update_another_records;
    commit_form;
    execute_query;

  • Gettig "Record has been modified" error while opening a window

    Hi,
    I have a window 'A' and window 'B'. On click of a button from 'A' window 'B' is opened. There are 3 fields in the window 'B' and these 3 fields are the part of the query which gets executed in window 'A'.
    Now on click of the button I am executing a proc which is setting window 'B' field values again.After this when you open the window 'B' it gives the error saying "Record has been modified". I tried giving commit_form after setting the fields but still it throws the error.
    Please advice on this.
    Thank you

    Deepak Jambhekar wrote:
    Hi,
    I have a window 'A' and window 'B'. On click of a button from 'A' window 'B' is opened. There are 3 fields in the window 'B' and these 3 fields are the part of the query which gets executed in window 'A'.
    Now on click of the button I am executing a proc which is setting window 'B' field values again.After this when you open the window 'B' it gives the error saying "Record has been modified". I tried giving commit_form after setting the fields but still it throws the error.
    Please advice on this.Just add
    EXECUTE_QUERY;after the commit_form;
    Hope this works..
    Hamid

  • Execution of ddl statement  in post-insert trigger

    hi,
    I'm working on headstart 6.5. I wants to execute a DDL statement in post-insert-trigger.The problem is this trigger is executed in between pre-commit and post-forms-commit.In pre-commit the transaction is opened with a insert statement that is inserting "open" in field status which is having a deffered check constraint QMS_NEED_TO_CLOSE_TRANSACTION.In post-forms-commit it will check whether the transaction is open if yes will check the business rule will delete the data that was inserted into qms_transaction in pre-commit trigger and will close the transaction .
         In between if i execute a DDl statement a commit will be performed on the insert statement written in pre-commit trigger.This will violate the check-constraint and we will get the error qms_need_to_close_transaction violated.
         My business logic wants this statement to be executed at the post-insert trigger on the block.Is this possible??
         Does anyone have face the same problem?Whts the workaround for the same?

    Hello,
    You could use the execute_query after the commit_form called, by exeample in a KEY-COMMIT trigger.
    KEY-COMMIT trigger
      Commit_Form ;
      Go_block( 'master_block' ) ;
      Execute_Query ;Francois

  • Buttons and text items on oracle forms 6i

    can i create dynamic buttons and text fields on oracle forms 6i.
    i mean when i insert record in database then automatically creat a button on form.
    Regards
    Munawer hussain

    Hi,
    One physical button is enough for a series of "functional buttons" per amount of simultanious visisble buttons. You can change the button prompt at run-time depending on a certain condition. That same condition can also be used when executing the when-button-pressed (wbp) trigger.
    Example:
    suppose you have 2 functions that you want to create buttons for: enter query and execute query. Only 1 button is visible at one time. In design time you create 1 button. In run-time, depending on :system.mode you set the button prompt to "enter query"or "execute query" and in the wbp trigger you write
    begin
    if :system.mode = 'QUERY'
    then
    execute_query;
    else
    enter_query;
    end if;
    end;
    Kind regards
    .

  • Oracle Forms 6i - mySQL (Commit Problem)

    Hi,
    i'm using Oracle Forms Builder 6i to connect to mySQL 3.23.49 via
    Oracle Open Client Adapter for ODBC 6.0.5.35.0
    Now I have a problem of controlling which form to commit if more than one form are opened.
    E.g. I need to open 2 forms (eg. A, B) and only want to commit the changes made on Form A
    1.
    I open the forms using the follows (i can't use OPEN_FORM('A', SESSION); since mySQL doesn't support)
    OPEN_FORM('A');
    OPEN_FORM('B');
    2.
    then I changed both forms
    Now the :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'CHANGED'
    3.
    I then press my custom save button on form A (triggers KEY-COMMIT). Inside KEY-COMMIT, it calls COMMIT_FORM, then triggers
    ON-COMMIT eventually. In ON-COMMIT, i use the built-in COMMIT to commit the changes.
    Then I found that :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'QUERY' which is normal. However both
    forms are committed.
    4.
    So I fixed it by: In ON-COMMIT, add RAISE FORM_TRIGGER_FAILURE; after COMMIT. Although it stops committing changes on another
    form. But :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are still 'CHANGED'. Then I do a EXECUTE_QUERY
    after COMMIT_FORM to change back :SYSTEM.FORM_STATUS, etc to 'QUERY'
    5.
    It works. Only Form A is committed. However when Form A has a lot of records (eg. >500), it affects performance.
    Does anyone know how to solve this problem?
    Any help would be greatly appreciated
    Peter

    The question is not how you disable a key, it might be more how to disable a functionality. What functionality do you want to disable? By default F5 maps to the KEY-MENU-trigger, if thats the function you want to disable, write a NULL; in the KEY-MENU-trigger.

  • LOV Display - "Do you want to save changes?"

    Hello,
    I setup and simple LOV with just a few fields. When the user enters runs the form they can click on a button "View List", then the LOV displays nicely. They can choose a record from the list and it displays just fine in my form.
    The problem is that when they click on the "View List" button again, then chose a differnent record, I keep getting the message "Do you want to save the changes you have made?". Even when you say "NO" it doesn't even bring up the record that I clicked on.
    My "View List" whe-pressed trigger looks like this:
    IF Show_lov('LOV_NEWSLETTER') THEN     
         execute_query;
    END IF;
    Do I need to clear the form or something like that ?
    Please help,
    Bob

    Hi Bob,
    the reason is your execute_query statement in the trigger. The user picks up a value out of the LOV, the record get marked for insert/update inside forms. The next time the user picks up a value, forms have to ask for saving the changes because you wan't to progress a execute_query against the same table again. Why do you use execute_query after showing the LOV ?
    Hans

  • Enter-Query Mode

    I'm interested in starting a discussion on the restrictions of
    Enter-Query Mode, principally, why can you not navigate to a
    query only block whilst in this form mode? I have successfully
    implemented an full Query functionality without using the
    default forms behaviour, and wonder if there are any
    disadvantages that I have overlooked.
    null

    Kannan T. (guest) wrote:
    : Hi Steve,
    : Can you make your quest/requirement more clear and detailed,
    so
    : that I will be able to discuss with you for each specific
    : points.
    : With best regards,
    : Kannan
    Hi there,
    Its quite involved, I have some documentation that goes some way
    to describing the problem/solution, but briefly I find that when
    in 'Enter-Query' mode (system.mode = 'ENTER-QUERY') there are
    two restrictions
    1) You cannot navigate to another block. This is useful in a
    number of cases, like if you want to implement a more powerful
    List of Values facility, or provide the user a seperate screen
    to build up complex query criteria
    2) If you write a trigger that uses 'enter_query' built in,
    processing stops at this point. The standard workaround for this
    is to start a timer before the call to 'enter_query', and when
    the timer expires it performs the processing you want to do
    after 'enter_query'.
    So, I decided to rewrite the default forms enter/execute query
    processing (which was pretty straightforward), so my forms never
    go into 'Enter-Query' mode. What I am interested in is if there
    is anything that using the default forms processing gives, that
    I may have missed!
    Regards Steve
    null

  • Enter_query and execute_query

    hi all,
    i have a form containing a master-detail, the first thing i do i enter values in 2 fields (of the block A) and i validate (this record already exists), after validate i show in the same form other fields of the block A for update and i mask the first button "validate" and i show another button "validate" to commit changes in block A and Inserting values in detail block B
    the problem:
    when i validate (the first button "validate") i get the message: 'would u save the changes and i must click on "no" in order to show the other fields, so how can i do this without having this message?
    i have enter_query in new-form-instance and execute_query in the first button "validate"

    hai, ali
    just add a parameter to u r execute query procedure.
    EXECUTE_QUERY(NO_VALIDATE);
    this will not validate u r block data and gets total record values.
    if this not solves send complete problem description to my mail.
    hope it works for u.
    bye.
    Raj
    mail : [email protected];

Maybe you are looking for