🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4346

Wrong numbers in primary index (auto-number, Access mdb)

#4346
From: Wolfgang Baudisch
Date: Fri, 11 Jan 2002 09:28
29 lines
2128 bytes
When I want to add a record into an mdb database, the auto-number field
"MovieID" is assigned to some higher values, not sequential like 1,2,3...but
121, 137, 258 etc. Is this caused by the ODBC connection? When I enter
records in the program that uses the database, they are strictly sequential
in the index field, except the first after an import via BDE engine. It
seems, the last value is stored in the mdb file and from this value
incrementing starts.

The database contains 34 tables. The table I use has 79 fields. When I
import records, the ID numbers have an increment of 79, starting from some
value like 547 or anything. When the records are added in the original
program directly, the increment is always 1.

I use a TTable, connected to the local database file.
For adding I tried the statements
Table1->AppendRecord(ARRAYOFCONST((( int) 0)));
or
Table1 -> Append();

The value entered in ARRAYOFCONST is always ignored.

After disconnecting the increment is more high (e.g. 547, 1015). When I stay
connected, the increment is always 79 (the number of fields), but 1 would be
correct and sufficient.

Any help would be greatly appreciated.

Kind regards sincerely,
Wolfgang
Technical Details
Message-ID: <3c3eb011_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,53d74109a9984012,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-01-11 01:34:02 PST
From: "Wolfgang Baudisch" <wolfgbaudisch@talknet.de>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Wrong numbers in primary index (auto-number, Access mdb)
Date: Fri, 11 Jan 2002 10:28:51 +0100
Lines: 34
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: 195.252.163.140
Message-ID: <3c3eb011_2@dnews>
X-Trace: dnews 1010741265 195.252.163.140 (11 Jan 2002 01:27:45 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews