Enter_query and execute_query progrmatically

I would like to place a button on my form that esential will
allow the user to press this button rather then hitting F7 and
F8 to query. The problem is that when you got into enter_query
mode you can not navigate to another block which then means that
I when i click my button to execute the query I am not able to.
It is not feasible to place the button as the same block i want
to query because of the fact that it displays multiple records
which means it would display my button 5 times. How can I
achieve this?
Thanks
Spencer Tabbert
null

You could use stored procedures and pass a where clause to the
query_procedure. Oracle's has limitations in handling operators
in enter_query mode.
cesar (guest) wrote:
: Spencer Tabbert (guest) wrote:
: : I would like to place a button on my form that esential will
: : allow the user to press this button rather then hitting F7
and
: : F8 to query. The problem is that when you got into
enter_query
: : mode you can not navigate to another block which then means
: that
: : I when i click my button to execute the query I am not able
: to.
: : It is not feasible to place the button as the same block i
want
: : to query because of the fact that it displays multiple
records
: : which means it would display my button 5 times. How can I
: : achieve this?
: : Thanks
: : Spencer Tabbert
: You should place your button in a control block, maybe in a
: horizontal toolbar canvas.The button will work for any block
of
: your form.
: If you need an example,you could send me an e-mail.
null

Similar Messages

  • 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];

  • Open_form with parameter list and execute_query

    Hello all.
    In a 6i form WBPressed trigger creates the parameter list
    begin
        v_paramlist_id := create_parameter_list('FRM_PARM_LIST');
        add_parameter('FRM_PARM_LIST', 'P_CUST_NUM', TEXT_PARAMETER,
                       to_char(:CUSTOMER_INFO.CUST_NUM));
        open_form('CUSTOM_SCORING', ACTIVATE, SESSION,                   
                         NO_SHARE_LIBRARY_DATA, 'FRM_PARM_LIST');
       destroy_parameter_list('FRM_PARM_LIST');
    end;Then in the second form, WNFInstance trigger has:
        if :PARAMETER.P_CUST_NUM is not null
         then
         GET_PARAMETER_ATTR('FRM_PARM_LIST', 'P_CUST_NUM', x, v_cust_num);
         set_block_property('CUST_SCORING', DEFAULT_WHERE,
                         'CUST_NUM = to_number('||v_cust_num||')');
         go_item('cust_scoring.cust_num');
         do_key('execute_query');I get FRM-40505 Unable to perform query. It was working, but I broke it along the way. Does this much seem correct to open the second form and query the specific customer?
    Upon opening the second form in the Developer tool, it cannot locate a custom Object Library called PARAMETERS. I deleted it & drug it in again from the original (sub-classed). Sould I do the entire library?
    Thanks.

    Hey - I think I see the problem today.. (fresh set of eyes)
    open_form('CUSTOM_SCORING', ACTIVATE, SESSION,
    NO_SHARE_LIBRARY_DATA, 'FRM_PARM_LIST');
    Change this to
    open_form('CUSTOM_SCORING', ACTIVATE, SESSION,
    NO_SHARE_LIBRARY_DATA, v_paramlist_id );
    Hello all.
    In a 6i form WBPressed trigger creates the parameter
    list
    begin
    v_paramlist_id :=
    := create_parameter_list('FRM_PARM_LIST');
    add_parameter('FRM_PARM_LIST', 'P_CUST_NUM',
    UM', TEXT_PARAMETER,
                       to_char(:CUSTOMER_INFO.CUST_NUM));
    open_form('CUSTOM_SCORING', ACTIVATE, SESSION,
    ION,                   
    NO_SHARE_LIBRARY_DATA,
    O_SHARE_LIBRARY_DATA, 'FRM_PARM_LIST');
    destroy_parameter_list('FRM_PARM_LIST');
    end;Then in the second form, WNFInstance trigger has:
    if :PARAMETER.P_CUST_NUM is not null
         then
    GET_PARAMETER_ATTR('FRM_PARM_LIST', 'P_CUST_NUM', x,
    , v_cust_num);
         set_block_property('CUST_SCORING', DEFAULT_WHERE,
                         'CUST_NUM = to_number('||v_cust_num||')');
         go_item('cust_scoring.cust_num');
         do_key('execute_query');I get FRM-40505 Unable to perform query. It was
    working, but I broke it along the way. Does this
    much seem correct to open the second form and query
    the specific customer?
    Upon opening the second form in the Developer tool,
    it cannot locate a custom Object Library called
    PARAMETERS. I deleted it & drug it in again from the
    original (sub-classed). Sould I do the entire
    library?
    Thanks.

  • Webutil and execute_query

    Hi All, Here's my problem for today.
    I have a tabular datablock with over 30 data items in each row that is populated by Execute_query.
    What I want to do is take results of that query and use Web_util and download the data to my desktop.
    I've done something similar by using a cursor, looping thru it and writing the data out, line by line using the "client_text_io.put_line" command and specifying the individual data items.
    Is there a way to be able to capture the results of the execute_query and in one swell foop use web_util to transfer this data to my desktop?
    Thanks,
    Larry

    If you must use the result of a execute query in a block you can use GO_BLOCK('block_name'), FIRST_RECORD and NEXT_RECORD to loop over the records and then use put_line to write the content of the block's fields to a file.

  • Set_block_property and execute_query

    I created two forms say f1 and f2. I have a button pb1 in f1, when I press pb1, the second form f2 is called.
    Now in form f2, I implemented the trigger when_new_form_instance as follows:
    set_block_property('users', default_where, 'id=:global.user_id');
    execute_query;
    The problem is that the query is not executed. If I replace the above two lines with:
    select first_name, last_name into :user.first_name, :user.last_name
    from users
    where id=:global.user_id;
    then this query executed. Anybody help me please?
    By the way, if anybody could give me a simple form (detailed steps) to implement the following:
    1) when the form first loads, it executes a query automatically.
    2) a button "Save" to let me save changes on any fields (insert or update?).
    Thanks a bunch.

    Check if you have set the where clause in the block property of the form during design time ie. set the where clause in the blocks property sheet. The set_block_property's default_where will not override the where clause set during the design time. The implicit query which you are giving will always work.
    Hope this helps.

  • Creating Query Form in Forms 6i

    Is there any standard Oracle Templates to create a query form or the search form in 6i.
    Thanks,
    Sunil

    Hi,
    AFAIK, there is no templates as such. The search form / query form design is purely based on your requirement. Oracle provides the built-ins (enter_query and execute_query) with the default columns. If you need to build your own search form, put all the required attributes in a form manner, and then generate your own where clause based on the user input to query on the table.
    -Arun

  • Exiting form after being in query mode

    Hi guys,
    Having an issue with some forms after migrating from forms version 6i to 10g. Learning as I go along.
    Forms which startup in query-mode seem to have an issue when closing - all have two blocks - one block is utilised through user query and the other (like a child) displays the query results and can be updated from here. If the user does not enter a query they can cancel it using exit_form which works fine.
    After a query has been completed the system mode returns to 'normal' mode (which I can see through debugging by entering messages/pauses throughout the code). However when exiting the application breaks with error FRM-92100. I have had this problem before with regards to exiting forms but I got round this by having an open window (acting as a parent or root window) in the background which is not closable. Been tweaking the form all afternoon including using exit_form(no_validate) and other changes. By commenting out enter_query and execute_query commands the form closes as normal without issue which means it is related to query mode or something along these lines.
    If anyone has any ideas or pointers on how to move forward with this it would be much appreciated.
    Cheers,
    Robin

    Guys,
    Thanks for the replies.
    The form currently uses exit_form twice in order to close the query mode and I receive a message "query cancelled" to confirm this.
    I have also tried - and retried for the benefit of confirming this - the code you have mentioned u3 - using it in the when-window-closed trigger. I chose <option> to be no_validate.
    The main app is opened from a webpage. Forms are opened from a menu which is attached to all forms. The code that opens the forms is open_form (i.e. not call_form or new_form) for modal reasons.
    The application is disconnected straight after exit_form is used - its as if coming out of query-mode to normal causes this as I said before closes gracefully when I remove the enter_query command.
    As for the error message itself here is a fuller picture:
    FRM-92100: Your connection to the server was interrupted. This may be the result of a network error, or a failure on the Server. You will need to reestablish your session.
    Details...
    java.lang.NullPointerException
    at oracle.forms.handler.TextComponentItem.selectionChanged(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextComponent._fireSelectionChanged(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextComponent.select(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextField._selectAll(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextField.processFocusEvent(Unknown Source)
    ...AND SO ON!
    Hope this gives a better picture of what's going on :)
    Robin
    update - There is a 'dirty' workaround to this problem - if i minimize the window (change its state in any way) after the mode is back from query-mode to normal THEN close the window it closes gracefully.
    Edited by: Robin84 on Sep 10, 2008 10:03 AM

  • Display employees details in the stacked canvas from the content canvas

    Hi all,
           I want to display employees details in the stacked canvas from the content canvas,where i passed the empno & click on the find button , i have 2 blocks(emp,control), in control block only find button there, I have only one table i.e;emp
    BEGIN
        GO_BLOCK('EMP');
        Set_block_property('EMP', default_where, 'Empno = :EMP.EMPNO');
         Show_view('EMP_DET_CAN');
        execute_query;
    END;
    Thank You

    Hi Andreas Wieden,
    Andreas Weiden wrote:
    When you query on the EMP-block, yiou cannot include a WHERE-condition to that block as the block is cleared when the EXECUTE_QUERY starts. If you want to have a different find-block where you enter your search-condition, you have to include that item in your separate find-block. Otherwise use the standard-search-mechanism with ENTER_QUERY and EXECUTE_QUERY.
    You are right, so where clause is not possible in the same block, right?.I have to take empno column where it is a search column into the control block right?
    Please suggest me i want to retrieve records into the stacked canvas when i pass the empno & click on the find button in the content canvas? Is this not possible? If possible please let me know? I mean i want to take the search column in the EMP Block & find button in the control block..
    Thank You

  • How to simulate F8

    Hi All,
    In the smartbar, there are Enter-Query button and Execute-Query button. When the user presses F7 or Enter-Query button, enter some values in the form, then presses F8 or Execute-Query button, the corresponding records will display.
    However, I don't want to use the smartbar, I want to create my own buttons to perform these functions. I know I can create two buttons with the code 'enter_query' and 'execute_query' respectively, but the 'hand-made' Execute-query button can only retrieves all records, and after pressing the 'hand-made' Enter-query button, the user has to press F8. But the user may not know this, so is there a way that I can create a button that simulates
    the F8 key?
    Thanks in advance

    All you will need to do is go over the items in the block collect the inserted value and use the set_block_property(Default_where) built in to set a where condition for your block and then execute the query.
    I think that using the default behavior that Forms gives you is simpler.

  • Serach -Result set form in Forms 6i

    Hi All,
    I am new in forms 6i customization.Your help needed.
    I want to develop one search and its result set form in two different screens. Serach form will be based on one custom table(spend) and its result set would be shown based on another custom table(vendor_Sites ). spend .vendor_site_pk_key = vendor_site.vendor_site_pk_key. when user seach giving date range I need to check weather it falls between spend table's spend_date_pk key, taking those records vendor_site_fk_key I need to go vendor_site table (vendor_site_pk_key) and in result set form I need to show vendors level data.
    Can you please help me on the approach how to build this.
    Waiting for your responce.
    Thanks.

    Hi,
    AFAIK, there is no templates as such. The search form / query form design is purely based on your requirement. Oracle provides the built-ins (enter_query and execute_query) with the default columns. If you need to build your own search form, put all the required attributes in a form manner, and then generate your own where clause based on the user input to query on the table.
    -Arun

  • Execute_query not showing the  -WORKING ...-  Message on Forms 10g

    Hello,
    There is a strange thing happening with our Forms that were migrated to 10g.
    1) Our keys were remapped to the ones used in the 6i Version. For example: CTL+L is F9
    2) When a user presses F7 and then F8, on Forms 6i, we have the sequence of message:
    Enter a query; press F8, CTRL+q to cancel
    then
    Working ...
    and finally we get the records.
    However on Forms 10g, we have when a user presses F7 and then F8 :
    Enter a query; press F8, CTRL+q to cancel
    and the message -WORKING...- is not shown and after a while we get the records.
    There are no message_level before the enter_query or execute_query and there is no :system.suppress_working in the form.
    What could be the problem ?

    1) Our keys were remapped to the ones used in the 6i Version. For example: CTL+L is F9 Key mapping is controlled by the file fmrweb.res in path <DevSuiteHome_1 path>/forms/
    Forms 10g is released with a unix style file where Ctrl+L is mapped to List of Values. There is an alternate file named fmrpcweb.res that maps F9 to List of Values. By renaming fmrweb.res to something else, and copying fmrpcweb.res to fmrweb.res, you will get the PC platform functionality.
    You can edit the Web Forms fmrweb.res file using a text editor to tailor the function keys any way you need.
    and the message -WORKING...- is not shown and after a while we get the records.Hmmm.... I tried that with a simple "default" test form, and indeed, the working... message does NOT appear, even when I set the Query Array size and Records Buffered properties to 1000 and queried a very large table. Why don't you open a Service Request with Oracle, and report back if you find a solution.

  • Execute_query error

    Hi master
    Sir
    I use enter_query through button and give 10 in deptno textbox
    But I execute_query through button no give result
    An use form menu then give result easily what happen
    Enter_query code
    Go_block(‘emp’);
    Enter_query;
    execute_query code
    Go_block(‘emp’);
    execute_query;
    and
    execute_query code
    execute_query;
    and how use option button
    please give me idea
    thanking you

    Hi Karen,
    We have just run into this issue...trying to find out more, but the Crystal Report developer stated...
    "When I alias a table in crystal and use a field from that alias I get the following error:"
    Database connector error: /CRYSTAL/OSQL_EXECUTE_QUERY returned: subrc: 4. message "CONTENT-0-0" has already been declared.
    Was this the same  OSQL_EXECUTE_QUERY error you received? and by chance did you get it resolved.
    Also having the resource go through the checks on the transports per Ingo.
    Thanks.
    Kevin

  • Enter_qurery/execute_query... its very URGENT!!!!

    hi sir/madam,
    i have a problem with execute_query...ENTER_QUERY is working fine...But EXECUTE_QUERY not giving any response...the code written for both are given below...
    first trigger
    go_block(<block name);
    enter_query;
    second trigger
    go_block(<block name);
    execute_query;
    wht 2 do ??? but Ctrl+ F11 for execution is working fine...

    hi,
    created a block using wizard..and i'm trying to find a record. i used Enter_query to enter a value and Execute_query for retrieval. the two queries r placed in two buttons.The Enter_query is working fine, but no result is comming from execute_query, execute_query will work if i press CTRL+ F11.
    regards.

  • Two Master  and two details block problem

    Hi,
    I am getting problem in displaying the correct records on one of the detail block. There is one main master block 'A' and then it has one details block 'B' and then this detial block 'B' has got two details blocks 'c' and 'D'. I form different queries based on the value selected at detail block 'D'. Now i go to ,aster block and execute_query then it fetche the correct record at master block not on detail block 'D'. I have one anmoly in Dtails Block D and Master block B that they are joined with a common field not on the basis of proimary key and forign key. Please sugget

    Hi,
    When you establish the relations using the references, then oracle will look for the parent key in both the parent tables. Either you need to remove the foreign keys or change your db design to add one more table and have one-one parent child relationships.
    HTH
    Regards,
    Badri.

  • 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.

Maybe you are looking for

  • Connecting MDD to Macbook via fire wire

    I thought it would be as simple as connecting the two...But it's not. I tried different ports on the MDD and still nothing. How do I do it? I just want to transfer some files from one to the other.

  • CX_SY_MESSAGE_IN_PLUGIN_MODE Exception

    Hello.  I am getting an BSP error and can anybody tell me what I am doing wrong?  Below is detailed error I am getting on the web application: "SAP Note:  The following error text was processed in the system: Message E DBMAN 882 cannot be processed i

  • Security for Oracle BPM PAPI WS

    Hi all, 1) While creating a session using PAPI WS if we use the password same as username can't the webservices be invoked by other applications in te same network? How to prevent this? Any application which knows an username in Oracle BPM directory

  • Adobe xi standard won't download from store

    purchased adobe xi standard  (upgrade). I'm trying to download it to a new win7 pc. from store, I follow directions, click download but it hangs and never sarts the download. I have downloaded adobe flash, the freeadove reader with no problem I tried

  • Import dll callback function

    Having trouble with this line "void   (*m_callback)(_t_pciCommand *cmd);" in PciApi.h file. I have replaced it with NULL and was able to import 2 functions, PciAllocCommand and PciSendCommand. I was then able to get valid information using GetValueBy