How to handle duplicate value in oracle forms at runtime. [message #639823] |
Fri, 17 July 2015 04:32  |
 |
jgjeetu
Messages: 373 Registered: July 2013 Location: www.Orafaq.com/Forum
|
Senior Member |

|
|
I have created a database data block using emp table in scott schema.
and it is tabular type displaying 1o records at a time .
My requirement is at the time of entering value using forms at runtime .
when i go to next record and enter exact value which is already present in previous record in same column .
at that time i want to restrict user from entering duplicate value before he saves the record.
For ex i want to restrict duplicate entry for "ename" column :-
in first row entered value:-
empno=1234 , ename='ABC'. , job='salesman' ......
in second record record
empno= 2345 , ename ='ABC'
now it should display message/alert that 'ABC' value for ename is already present in first record.
so you cant enter it again before he saves the record.
Please tell the possible solutions.
[Updated on: Fri, 17 July 2015 04:33] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: How to handle duplicate value in oracle forms at runtime. [message #639848 is a reply to message #639842] |
Fri, 17 July 2015 19:02   |
cookiemonster
Messages: 13904 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Generally when doing duplicate checks you need to make sure not only that user hasn't entered the same data twice but also that they haven't entered the same data as someone else. If that's the case here then you have no choice but to check the DB.
And let's be clear my suggested approach doesn't rely on constraints at all (though you should still have them on the table).
@jgjeetu - read up on what post does, it does not rely on the user pressing save.
|
|
|
|
|
|
|
|