🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: InsertRecord with ADO and MSJET on an AutoNumber field

#1647
From: C�sar
Date: Fri, 05 Mar 2004 18:34
35 lines
1775 bytes
    Normally, when you insert an AutoNumber field you have to leave it
empty; that is, you don�t have to put anything.
    Try it, because I don�t know the InsertRecord method.


"Benjamin Pratt" <benjamin.pratt.getridofthis@verizon.net> escribi� en el
mensaje news:4048bf76@newsgroups.borland.com...
> Hello,
> I am trying to insert a new record in a table that has two fields. The
first
> is an AutoNumber and the second is Text.
>
> I have tried:
>
> LanguageTable->InsertRecord(ARRAYOFCONST((Null, dlg->Result)));
>
>
> and
>
> LanguageTable->InsertRecord(ARRAYOFCONST((Unassigned, dlg->Result)));
>
> both atempts throw an exception with the message "Invalid value for Field
> 'ID'" which is the AutoNumber field.
>
> How can I use InsertRecord for this?
>
>
> BTW, this is JET 4.0 and LanguageTable is a TADOTable.
>
> Thanks,
>
> Ben
>
>
Technical Details
Message-ID: <c2agsj$1opfk6$1@ID-201928.news.uni-berlin.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!cmr-81-9-226-104.telecable.ES!not-for-mail
References: <4048bf76@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,bcd007dd1c5cab29
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-03-05 10:28:36 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!cmr-81-9-226-104.telecable.ES!not-for-mail
From: "C�sar" <kaesar2@lycos.es>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: InsertRecord with ADO and MSJET on an AutoNumber field
Date: Fri, 5 Mar 2004 19:34:29 +0100
Lines: 37
Message-ID: <c2agsj$1opfk6$1@ID-201928.news.uni-berlin.de>
References: <4048bf76@newsgroups.borland.com>
NNTP-Posting-Host: cmr-81-9-226-104.telecable.es (81.9.226.104)
X-Trace: news.uni-berlin.de 1078511315 59555462 I 81.9.226.104 ([201928])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165