Article View: borland.public.cppbuilder.database.ado
Article #4425Re: How to perform an UPDATE SQL command
From: Gary Desroches
Date: Wed, 26 Dec 2001 14:39
Date: Wed, 26 Dec 2001 14:39
22 lines
1844 bytes
1844 bytes
You answered your own question, the query sounds like it worked since it tried to update the database which you had neglected to put into edit mode first. Mytable->Edit(); // Assumes that query has been previously cleared & SQL has been updated UpdateQuery->Prepare(); UpdateQuery->ExecSQL(); MyTable->Post(); "Luca" <luca_82@libero.it> wrote in message news:m5v62u0lvab5i4k9f7ecbhm8204dq00uqd@4ax.com... > I want to know the right way to perform an update sql command with an > ADOQuery. > In my project I have 3 component: 1 ADOConnection, 1 ADOQuery and 1 > DataSource connected to an Access 2000 database. In this way I can > Insert new record, but when I tray to perform an update on an existing > record the compiler return me an error that the dataset is not in edit > or insert mode? > > > Thanks in advance.
Technical Details
Message-ID:
<a0cn1q$nvb$1@slb6.atl.mindspring.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!cpk-news-hub1.bbnplanet.com!washdc3-snh1.gtei.net!news.gtei.net!news.mindspring.net!not-for-mailReferences:
<m5v62u0lvab5i4k9f7ecbhm8204dq00uqd@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,f1add9ae019549b4 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-12-26 06:33:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!cpk-news-hub1.bbnplanet.com!washdc3-snh1.gtei.net!news.gtei.net!news.mindspring.net!not-for-mail From: "Gary Desroches" <gcdesroches@mindspring.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: How to perform an UPDATE SQL command Date: Wed, 26 Dec 2001 08:39:05 -0600 Organization: MindSpring Enterprises Lines: 24 Message-ID: <a0cn1q$nvb$1@slb6.atl.mindspring.net> References: <m5v62u0lvab5i4k9f7ecbhm8204dq00uqd@4ax.com> Reply-To: "Gary Desroches" <gcdesroches@mindspring.com> NNTP-Posting-Host: d1.56.36.b5 X-Server-Date: 26 Dec 2001 14:32:26 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200