Article View: borland.public.cppbuilder.database.ado
Article #683Field cannot be modified error
From: siraj
Date: Thu, 02 Mar 2006 08:16
Date: Thu, 02 Mar 2006 08:16
31 lines
1726 bytes
1726 bytes
Hi, I am now using C++ builder 2006 and MS acccess 2003. I have simple table Table1 in Access with the following fields. This table is linked to other table. 1) id autonumber 2) Name String I have to add nearly 10000 rows to the table. I have to also insert into the 'id' field. I am using TADOQuery to insert. If I use, INSERT INTO Table1(id,Name) VALUES(2,"sms") ExecSQL() there is no problem. If I use, ADOQuery1->Insert(); ADOQuery1->FieldValues["id"]=2 ; ADOQuery1->FieldValues["Name"]="sms"; ADOQuery1->Post(); I get the error "Field 'id' cannot be modified". Why? Insert into the dataset is faster compared to using ExecSQL() 10000 times. Please help. Regards, Siraj
Technical Details
Message-ID:
<4406a9d4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,a7a9d6e24de244a5,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "siraj" <siraj.sm@omnisens.ch> From: "siraj" <siraj.sm@omnisens.ch> Newsgroups: borland.public.cppbuilder.database.ado Subject: Field cannot be modified error Date: Thu, 2 Mar 2006 09:16:21 +0100 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-Antivirus: avast! (VPS 0609-1, 03/01/2006), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 212.109.69.36 Message-ID: <4406a9d4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1141287380 212.109.69.36 (2 Mar 2006 00:16:20 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail