Article View: borland.public.cppbuilder.database.ado
Article #5187Re: Clarification on AutoInc fields
From: Umberto Uderzo
Date: Fri, 29 Jun 2001 08:20
Date: Fri, 29 Jun 2001 08:20
22 lines
1836 bytes
1836 bytes
Hi Mark, Sure you're right about the SELECT MAX, infact this must be protected by some sort of lock, but let's talk about the link you posted: the solution is good but i think this will be better using a separate session to compute only the new id. So you can use transactions normally with your application, and call a function for the id that works on his own session, that can be opened only once for working session and into wich you can perform as many COMMIT as you line without affecting the main data processing... Bye... Umberto Uderzo "Mark Cashman" <mcashman@temporaldoorway.com> ha scritto nel messaggio news:3B3BD2D2.5F446F35@temporaldoorway.com... > Hi, Umberto! > > The method you describe is not safe in a multiuser environment. Have a > look at > http://www.temporaldoorway.com/programming/cbuilder/databaseandbde/generateu niqueid.htm >
Technical Details
Message-ID:
<3b3c3ad2_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnewsReferences:
<3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,2eab2f6830ef7732 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-06-29 01:26:21 PST From: "Umberto Uderzo" <umberto@uderzo.it> Newsgroups: borland.public.cppbuilder.database.ado References: <3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> Subject: Re: Clarification on AutoInc fields Date: Fri, 29 Jun 2001 10:20:51 +0200 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 213.213.38.38 Message-ID: <3b3c3ad2_1@dnews> X-Trace: dnews 993802962 213.213.38.38 (29 Jun 2001 01:22:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews