Article View: borland.public.cppbuilder.database.ado
Article #1646InsertRecord with ADO and MSJET on an AutoNumber field
From: Benjamin Pratt
Date: Fri, 05 Mar 2004 18:00
Date: Fri, 05 Mar 2004 18:00
24 lines
1391 bytes
1391 bytes
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:
<4048bf76@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,bcd007dd1c5cab29,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-03-05 10:11:21 PST From: "Benjamin Pratt" <benjamin.pratt.getridofthis@verizon.net> Newsgroups: borland.public.cppbuilder.database.ado Subject: InsertRecord with ADO and MSJET on an AutoNumber field Date: Fri, 5 Mar 2004 10:00:11 -0800 Lines: 26 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 NNTP-Posting-Host: 24.130.93.201 Message-ID: <4048bf76@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1078509430 24.130.93.201 (5 Mar 2004 09:57:10 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail