Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How to identify a new record (not saved)?
Hi
In my master-detail form, I have a command button to delete the currently selected record in a detail block.
Since users may click this delete button after they created a new record but have not saved yet, I want to disable this button in that case (the current record is a new record which has not been saved yet) or display a message that "the record has not been saved".
I have thought of this way: creating a cursor of the underlying table's primary key, then loop through to find the current primary key value in the form. If it is not found then it means the record has not been saved yet. I think this may be slow when the table grows larger (like millions of rows)
However, I believe there must be a better way. I appreciate if someone can give some hint?
Thanks
Nick
Received on Sat Oct 05 2002 - 06:40:00 CDT