🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO Exception

#2796
From: Alex Ip
Date: Thu, 20 Mar 2003 05:52
37 lines
2423 bytes
Hello Sky...

A TDataSet object MUST be in edit mode (either by having their AutoEdit
property set to true or by having their Edit() method called) before the
current record can have its field values changed. The changes to the current
record are not actually posted to the database until you go to another
record or explicitly call the Post() method of the dataset. If you wish to
cache changes to multiple records, you should look at setting the dataset's
CachedUpdate property to true (if your database engine supports this) or,
better still, use a TClientDataSet object

HTH...

Regards,

    Alex.

"Sky" <akeehuang@163.net> wrote in message
news:3e758449@newsgroups.borland.com...
> I am using ADO to operate database,
> TADOConnection/TADOQuery/TDataSource/TDBEdit has been used,
> if I set the AutoEdit property of TDataSource true,
> I can use it normally, the data in TDBEdit can save automatically.
> But if i set AutoEdit property false(I want save record manually till all
> data input completely),
> But It always raise exception class EDatabaseError when i modify the data
> and change the focus of active control, it show "DataSet not in edit or
> insert mode,
> I try to use the OnDatachange and OnUpdataData event of TDataSource
> or the OnEditError and BeforeEdit event of TADOQuery to verify this,
> But it always throw this exception first before these event had been
> triggered.
>
> Sky
>
>
>
Technical Details
Message-ID: <3e7956dc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3e758449@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e766e18548493c07
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-03-19 21:52:21 PST
From: "Alex Ip" <alex.ip@bigpond.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e758449@newsgroups.borland.com>
Subject: Re: ADO Exception
Date: Thu, 20 Mar 2003 16:52:31 +1100
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.44.186.165
Message-ID: <3e7956dc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1048139484 202.44.186.165 (19 Mar 2003 21:51:24 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail