🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #136

Re: insert into problem

#136
From: Bill Todd [TeamB]
Date: Mon, 09 Jun 2008 12:54
24 lines
2081 bytes
Isaac wrote:

> if I delete item code 3 the remaining will be as they are no change
> there will be gaps but item code count based on its inventory code
> not a unique number all over the table

The the problem is getting the next number for the group when you
insert a new record in a way that ensures that two users cannot get the
same number. I suggest you lock the master record by setting one of its
fields to itself then get the last used number, add one to it, insert
the new detail record then commit the transaction. This will prevent
two users from inserting detail records at the same time.

> 
> 
> Yes , last week I did not able to post for 2 days , is the
> newsgroups.borland.com will remain the same after *Embarcadero
> acquired CodeGear ? *

The newsgroup domain will probably change in the future but it has not
changed yet.

-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <484d280b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <484b07da@newsgroups.borland.com> <484b16e4@newsgroups.borland.com> <484b52eb$1@newsgroups.borland.com> <484c007f@newsgroups.borland.com> <484c07a9$1@newsgroups.borland.com> <484c2394@newsgroups.borland.com> <484c7832$1@newsgroups.borland.com> <484d14e3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,ed255c09332ecd2c
X-Google-Attributes: gid114a0e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd [TeamB]" <no@no.com>
Subject: Re: insert into problem
Newsgroups: borland.public.interbase.sql
References: <484b07da@newsgroups.borland.com> <484b16e4@newsgroups.borland.com> <484b52eb$1@newsgroups.borland.com> <484c007f@newsgroups.borland.com> <484c07a9$1@newsgroups.borland.com> <484c2394@newsgroups.borland.com> <484c7832$1@newsgroups.borland.com> <484d14e3$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.9
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 63.147.41.232
Message-ID: <484d280b$1@newsgroups.borland.com>
Date: 9 Jun 2008 05:54:35 -0700
X-Trace: newsgroups.borland.com 1213016075 63.147.41.232 (9 Jun 2008 05:54:35 -0700)
Lines: 24
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail