🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how can I know the dataset in ADOQuery has been changed?

#2848
From: Jonny
Date: Tue, 11 Mar 2003 09:22
56 lines
2703 bytes
I too had this problem

I overcame it by using the requery() method on the ADOTable - however, this
would loose my place in the database so i used a bookmark to save it.. The
code looked a little bit like this:

void TForm1::DB_Refresh()
{
 TBookmark SavePlace;
 TExecuteOptions myOptions;
 myOptions << eoAsyncFetch ;

 // get a bookmark so that we can return to the same record
 SavePlace = ADOTable1->GetBookmark();
 // Re run the query
 ADOTable1->Requery(myOptions);
 // Now return to where we were before
 ADOTable1->GotoBookmark(SavePlace);
 ADOTable1->FreeBookmark(SavePlace);
}



Jonathan


"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:3e684296@newsgroups.borland.com...
> You can do this on client-side cursor with LockType = ltBatchOptimistic.
In
> this mode ADO caches data, updates, inserts, deletes etc. Look help for
> FilterGroup property.
>
> ----------------------------------------------------------------
> Regards,
> Viatcheslav V. Vassiliev
> http://www.oledbdirect.com
> The fastest way to access MS SQL Server, MS Jet (MS Access)
> and Interbase (through OLEDB) databases.
>
> "NEO" <glin@gri-china.com> �������/�������� � �������� ���������:
> news:3e683f38@newsgroups.borland.com...
> > for example , any changes made in MS Office Word is going to be recorded
,
> > and promots you before you exit without save.
> >
> > Does ADOQuery have any property or method to do the same thing?
> >
> > this matter has put me in the jam so long time.
> >
> > Thanks
> > neo
> >
> >
>
>
Technical Details
Message-ID: <3e6dac14$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail
References: <3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,99977fdb00087541
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-03-11 01:36:59 PST
From: "Jonny" <jonny@nospam.jonnywilk.co.uk>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com>
Subject: Re: how can I know the dataset in ADOQuery has been changed?
Date: Tue, 11 Mar 2003 09:22:36 -0000
Lines: 58
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: 62.49.107.158
Message-ID: <3e6dac14$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047374868 62.49.107.158 (11 Mar 2003 01:27:48 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail