Home » Developer & Programmer » Forms » codinig for Execute_query button (Oracle 10g forms, widows XP)
codinig for Execute_query button [message #284147] Thu, 29 November 2007 00:52 Go to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
hi friends,

i have designed one form based on two tables and they have parent and child relation with each other. i have designed two buttons there one is (Query BTN) other is (Enter_query) button. query button is working but enter_query button is not working i have written this coding for this button.
ENTER_QUERY;
--with the
WHEN-BUTTON-PRESSED trigger on button.


but its not working now i dnt know what coding i shuld write in this button, so when i open the form and i want to go into execute query mode. how i can go.

Regards

Hasnat
Re: codinig for Execute_query button [message #284188 is a reply to message #284147] Thu, 29 November 2007 02:29 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why do you code something that Forms offers as its default behaviour? There is a shortcut key to enter a query mode, and there is the "Enter Query" button in the toolbar.

When saying that "it is not working", what does it exactly mean? Is there an error message? If so, which one?

Does this "enter query" button you've created belong to the same block you'd like to query? If not, you'll have to go there first, and then enter query mode:
GO_BLOCK('block_name');
ENTER_QUERY;
Re: codinig for Execute_query button [message #284194 is a reply to message #284147] Thu, 29 November 2007 02:48 Go to previous messageGo to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
actually i want to hide that tollbar and i want to give user buttons so, i am creating all these buttons.

i dont knw what you mean by block. as i told u. that i have one form only and on that form i have designed two form one is in the upper portion of that main form and second is at the lower portion of main form. both r joined with each other thrugh primary and forign key.
i just created one simple button and wrote
QUERY_EXECUTE;
there is no error message but its not giving me any out put when i run the form.

thanks for your reply ,
regards
Re: codinig for Execute_query button [message #284205 is a reply to message #284194] Thu, 29 November 2007 03:01 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No records retrieved? It means
a) there are no records in a table,
b) there are records there, but none of them satisfied query condition,
c) you did something wrong.

So, there are two blocks: master and detail. You've created two buttons. In which block are they? Master or detail, or none of them (i.e. another, control block)?

You may attach a sample form based on Scott's schema so that we could actually see and try what you've done.

Just being curious: what's the purpose in "removing" a default toolbar and replacing it with the one you are about to create? Why do you think that your code will work better than the one Oracle provides?

By the way, QUERY_EXECUTE doesn't exist in Forms (unless it is a custom procedure. If so, please, post the code you've put into it).
Re: codinig for Execute_query button [message #284216 is a reply to message #284147] Thu, 29 November 2007 03:19 Go to previous messageGo to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
as per your request i m attaching that form. you can check your self. button name is Execute.
regards

  • Attachment: conform.fmb
    (Size: 128.00KB, Downloaded 1098 times)
Re: codinig for Execute_query button [message #284265 is a reply to message #284216] Thu, 29 November 2007 04:41 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Unfortunately, my Forms Builder 10g (9.0.4.0.19) complains while opening your form: "PDE-PEP006 Encoded Program unit has an unknown format". This error prevents me from viewing PL/SQL code you've written.

Which version do you use? I'm not sure whether you have a much lower or much higher version than I do.
Re: codinig for Execute_query button [message #284880 is a reply to message #284265] Sun, 02 December 2007 07:01 Go to previous messageGo to next message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Try once as below:


For Enter Query:

GO_BLOCK("BLOCK_NAME");
ENTER_QUERY;


For Execute_query:

GO_BLOCK("BLOCK_NAME");
EXECUTE_QUERY(ALL_RECORDS);


if the above doesn't work then keep your command button as the same block that you wanna query operation.


** you will get better help from Help that is attached with Developer forms.

Just Search with the above keywords.

Thanks

Kamal Hossain
Re: codinig for Execute_query button [message #286544 is a reply to message #284880] Sat, 08 December 2007 01:10 Go to previous message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
i m very thank ful to u my friend its really working.

Regards,

Hasnat
Previous Topic: Installation of Oracle 10g Enterprise edition on Server
Next Topic: Not allow duplicate values for an item
Goto Forum:
  


Current Time: Mon Feb 03 01:06:42 CST 2025