Article View: borland.public.cppbuilder.database.ado
Article #2870Re: how can I know the dataset in ADOQuery has been changed?
From: Jonny
Date: Thu, 13 Mar 2003 11:11
Date: Thu, 13 Mar 2003 11:11
86 lines
3872 bytes
3872 bytes
Maybe, but the code seems to work okay for me
Jonny
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:3e6e15fa$1@newsgroups.borland.com...
> 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:
<3e70689b@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!newshosting.com!news-xfer1.atl.newshosting.com!216.65.3.53.MISMATCH!news-out.spamkiller.net!propagator2-maxim!propagator3-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com> <3e6dac14$1@newsgroups.borland.com> <3e6e15fa$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-13 03:29:38 PST From: "Jonny" <jonny@nospam.jonnywilk.co.uk> Newsgroups: borland.public.cppbuilder.database.ado References: <3e683f38@newsgroups.borland.com> <3e684296@newsgroups.borland.com> <3e6dac14$1@newsgroups.borland.com> <3e6e15fa$1@newsgroups.borland.com> Subject: Re: how can I know the dataset in ADOQuery has been changed? Date: Thu, 13 Mar 2003 11:11:30 -0000 Lines: 88 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: <3e70689b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047554203 62.49.107.158 (13 Mar 2003 03:16:43 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!216.65.3.53.MISMATCH!news-out.spamkiller.net!propagator2-maxim!propagator3-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail