Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question about Unique Table Columns - How to Handle Alerts

kurzweil4-550330Mar 16 2008 — edited Mar 18 2008
I have a table with a unique column, and I want to provide an error alert when a user tries to insert a record in which there is another record that already has the same value for that column.

I tried just relying on the table constraint in the DB, but I just get a "cannot insert record" message on the form run-time.

I put a query in the PRE-INSERT trigger to query and see if that value exists in another record and display the alert there, but my concern is that a record could be inserted by another user after my check query runs. In that case, I will still just get the "cannot insert record" message.

What is a good way that I can give an error alert AND assure that another record is not being inserted in the mean time?

Thanks,
Kurz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2008
Added on Mar 16 2008
6 comments
1,013 views