🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TADOQuery question

#5274
From: Formentz
Date: Thu, 28 Jun 2001 12:37
42 lines
1983 bytes
You could try to use the AfterScroll and BeforeScroll events :
void __fastcall TForm1::ADOQuery1BeforeScroll(TDataSet *DataSet)
{
    if(DataSet->State==dsEdit)
        if(DataSet->Modified) DataSet->Post();
        else DataSet->Cancel();
}
void __fastcall TForm1::ADOQuery1AfterScroll(TDataSet *DataSet)
{
    DataSet->Edit();
}

HTH

Ciao
    Formentz
"Nigel Jones" <npj@fasl.co.uk> ha scritto nel messaggio
news:3b3ae52f$1_1@dnews...
> Hi,
>
> I've got a standard TADOQuery that's selecting from an Oracle database.
> What I need to do is, after the selection, go through the selected data
and
> change some of it - but without setting edit mode and actually updating
the
> database.
>
> I guess the AfterOpen event is a good one to use, but trying to change the
> values of data without setting Edit mode gives an error.
>
> Any ideas on how to do this?
>
> Cheers
>
> --
> Nigel Jones, FASL
> ____________________________________________________________
> "The views of the author may not necessarily reflect those of the
company."
>
>
>
Technical Details
Message-ID: <3b3b23fe$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b3ae52f$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2dc17399197a8233
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-06-28 05:41:21 PST
From: "Formentz" <francesco@leotron.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b3ae52f$1_1@dnews>
Subject: Re: TADOQuery question
Date: Thu, 28 Jun 2001 14:37:08 +0200
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 62.122.20.186
Message-ID: <3b3b23fe$1_1@dnews>
X-Trace: dnews 993731582 62.122.20.186 (28 Jun 2001 05:33:02 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews