Hello
i am using forms 6i.I have a form where I am working on some DMLs.
When I enter data in text items and press save button, all the records inserted successfully. On save button there is commit_form on When_Button_Pressed trigger.
The problem is when I open the same form, search for a specific record, do modifications and press save it is not allowing me to update the record.
I want to update the searched record.
Kindly help me asap
Thanking you in advance.
Software/Hardware used:
ASKED:
December 23, 2008 9:20 AM
UPDATED:
May 11, 2012 3:20 PM
How exactly are you searching for that specific record ?
When you have designed a database block, you don’t need to perform any “select” statement to search for records. You just need to put the form in enter-query mode, and then execute the query. This is usually done by pressing F7 (enter-query), write the search criteria on desired fields, and then press F8 (execute-query).
If you are populating block’s items with a “select into” statement, you are not really modifying the queried record, but trying to insert it again, and that’s why the ORA-0001 is being raised.
Yes i am populating block’s items with “select into”.
how can i implement the enter and execute query in triggers.
what i want when user press search button the search criteria should be entered in a text item and in post_text_item trigger execute query should be entered.
this is giving me FRM-40737 error
kindly help me regarding this
enter_query and execute_query are restricted procedures. It means they cannot be called from triggers while internal navigation is ocurring.
From the forms help:
“Restricted built-ins cannot be called from the Pre and Post triggers, which fire when Form Builder is navigating from object to another.
Restricted built-ins can be called from the When triggers that are specific to interface items, such as When-Button-Pressed or When-Checkbox-Changed. Restricted built-ins can also be called from any of the When-New-”object”-Instance triggers and from key triggers. ”
So you probably will need to put another button, which will need to be pressed to actually perform the search.
Another option could be to create a timer in the post_text_item trigger (1 millisecond), and put the execute_query call in the when-timer-expired trigger.
1- press shift + f1 to know if the statement has some errors
2- you may have one field in the block, that is non database related, and you forgot to make it database item = no
3- you may set the update_allowed property to NO OR you set query only property to YES
4- you may have trigger in database of form that makes on-delete trigger wich make some errors preventing you from saving …
Good luck
hello sir
i need to display unique record in form6i then move value in report 6i
and display a report in recourd
Kbmemon, are you asking for the whole code to create a form, create a report, and call the report from the form ?
Please, be more specific.
Also, it would be a good idea to create a new question.