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 -> Re: How to identify a new record (not saved)?

Re: How to identify a new record (not saved)?

From: Nick <aroughguy_at_nsp.toughguy.net>
Date: Sun, 6 Oct 2002 16:05:40 +1000
Message-ID: <QoQn9.12427$Sr6.404471@ozemail.com.au>


I'm using Form Builder 6i on WinXP Pro
Couldn't find anything on row_flag or row_new in any Form Builder Help topics

Can you be more specific?

As said my way works fine, my concern is only on performance when data grows large.

Thanks
Nick

"Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in message news:92eeeff0.0210051050.3a9e3966_at_posting.google.com...
> "Nick" <aroughguy_at_nsp.toughguy.net> wrote in message
news:<9_Cn9.12273$Sr6.399198_at_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
>
>
> You neglected to mention your development tool e.g. VB, VC++ etc.
>
> In any case, most Windows development tools have same properties for
> controls. Assuming your detail block is a Table window then Table
> window control has certain constant properties e.g. ROW flags could be
> ROW_Edited, ROW_New, ROW_MarkDeleted etc. In a table window, these
> flags are set depending on the action.
>
> Query on the ROW flags. If flag is ROW_New then just clear the row
> without any server call. Otherwise mark the row or rows as
> ROW_MarkDeleted. Clicking on Save button deletes all marked rows.
>
> This logic gives you atleast one direction to work with.
>
> /Rauf Sarwar
Received on Sun Oct 06 2002 - 01:05:40 CDT

Original text of this message

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