From: "Matt B." <gtimatt@home.com>
Newsgroups: comp.databases.oracle.tools
References: <e0c9495d.0108060846.33dad8b@posting.google.com> <vsIb7.39851$MC1.11660011@news1.elcjn1.sdca.home.com> <3B702BBE.352C@yahoo.com>
Subject: Re: find max id for forms
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <NY0c7.41042$MC1.12184130@news1.elcjn1.sdca.home.com>
Date: Wed, 08 Aug 2001 01:53:49 GMT
NNTP-Posting-Host: 24.38.2.10
X-Complaints-To: abuse@home.net
X-Trace: news1.elcjn1.sdca.home.com 997235629 24.38.2.10 (Tue, 07 Aug 2001 18:53:49 PDT)
NNTP-Posting-Date: Tue, 07 Aug 2001 18:53:49 PDT
Organization: Excite@Home - The Leader in Broadband http://home.com/faster


"Connor McDonald" <connor_mcdonald@yahoo.com> wrote in message
news:3B702BBE.352C@yahoo.com...
>This only works in a single-user system, since two or more people could get
the same value.

It depends on when you do it.  If you do it on WHEN-NEW-RECORD-INSTANCE or
WHEN-VALIDATE-RECORD, maybe.  If you do it on PRE-INSERT, less likely.

>A sequence is a better solution

Again, depends on when you do it.  On PRE-INSERT, most likely OK.  If you
assign it sooner and the user doesn't commit, you'll "waste" the uncommitted
ones.

-Matt



