Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to identify a new record (not saved)?

How to identify a new record (not saved)?

From: Nick <aroughguy_at_nsp.toughguy.net>
Date: Sat, 5 Oct 2002 21:40:00 +1000
Message-ID: <9_Cn9.12273$Sr6.399198@ozemail.com.au>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US