Article View: borland.public.cppbuilder.database.ado
Article #5214Re: Clarification on AutoInc fields
From: Formentz
Date: Thu, 05 Jul 2001 07:47
Date: Thu, 05 Jul 2001 07:47
16 lines
1831 bytes
1831 bytes
Hi Umberto,
> P.S. I think it's a bit dangerous to rollback the id rows values as you
say.
> To have a sure robust mechanism i suggest to increment always and anyway.
> So: perform the increment step in a separate session.
I can't see the problem with rollback the id rows, because the first command
I do in every query that needs a counter is to update the counters table ( I
wrapped the insert into in a funcion that adds the right code to get the
counter value, so if I will find a better way, I can easily change the code
in the function ), and so, if there are more than one queries to be
executed, only one at a time will be executed, since the counters table is
locked by the repeatable read transaction isolation.
I did it so because I can't loose any numbers of the id.
Ciao
Formentz
Technical Details
Message-ID:
<3b441a9c$2_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> <3b3c3ad2_1@dnews> <3b3c7c38_1@dnews> <3b40f10e_2@dnews>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-07-05 00:48:15 PST From: "Formentz" <francesco@leotron.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> <3b3c3ad2_1@dnews> <3b3c7c38_1@dnews> <3b40f10e_2@dnews> Subject: Re: Clarification on AutoInc fields Date: Thu, 5 Jul 2001 09:47:49 +0200 Lines: 18 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: 62.122.26.16 Message-ID: <3b441a9c$2_2@dnews> X-Trace: dnews 994319004 62.122.26.16 (5 Jul 2001 00:43:24 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews