🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2853
From: Viatcheslav V. Vassiliev
Date: Tue, 11 Mar 2003 16:53
74 lines
3464 bytes
Requery re-executes command and fetches all rows again. So bookmarks become
invalid. You may try primary key, save its value before requery and locate
it after.


----------------------------------------------------------------
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.

"Jonny" <jonny@nospam.jonnywilk.co.uk> �������/�������� � ��������
���������: news:3e6dac14$1@newsgroups.borland.com...
> 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: <3e6e15fa$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!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com> <3e6dac14$1@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 09:02:54 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com> <3e6dac14$1@newsgroups.borland.com>
Subject: Re: how can I know the dataset in ADOQuery has been changed?
Date: Tue, 11 Mar 2003 19:53:00 +0300
Lines: 76
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: 213.247.201.57
Message-ID: <3e6e15fa$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047401978 213.247.201.57 (11 Mar 2003 08:59:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail