Searching using Oracle Forms 6i

80 pts.
Tags:
Data Manipulation Language
Oracle development
Oracle DML statements
Oracle Form Builder
Oracle Forms
Oracle Forms 6i
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Thanks for replying
when I search for a specific record using “select” statement, the record retrieved successfully but the error “FRM-40509:Oracle error:unable to UPDATE record” raises when I do some modifications and press save.
On “display error” the error is
“ORA-00001: unique constraint (SCOTT.PI_EMPLOYEEID_PK)violated”
Kindly suggest me regarding this problem ASAP
Thanking You in advance

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    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.
    68,635 pointsBadges:
    report
  • Rakh
    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
    80 pointsBadges:
    report
  • carlosdl
    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.
    68,635 pointsBadges:
    report
  • Aa123
    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
    10 pointsBadges:
    report
  • Kbmemon
    hello sir i need to display unique record in form6i then move value in report 6i and display a report in recourd
    10 pointsBadges:
    report
  • carlosdl
    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.
    68,635 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following