Article View: borland.public.cppbuilder.database.ado
Article #1466Re: Quick Question: BDE SetKey and Goto Key = ??? With ADO
From: James Peterson
Date: Thu, 24 Jun 2004 19:40
Date: Thu, 24 Jun 2004 19:40
56 lines
2772 bytes
2772 bytes
I was in the same boat and was advised to move away from tables and use
datasets and queries.
if (datamod->Table1->FindFirst()) \\ don't need to do since queries start at
the frist record when opened.
could do something like....
ADOQuery1->Close();
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add("select something from sometable where something =
somethingelse");
ADOQuery1->Open();
while(!ADOQuery->Eof)
{
.... Do some code to retreive data.
ADOQuery1->Next();
}
And to save to a table useing ADO you can use the datasets (ADODataset1 or
ADOCommand1 to insert new records. and update records.
"EDW" <aegis45@hotmail.com> wrote in message
news:40631630$1@newsgroups.borland.com...
> I'm converting an application that used the BDE with access to use ADO
> with access. I'm having a bit of difficulty when it comes to recognizing
> the methods with ADO that correspond to the methods used in BDE.
>
> I'm using a TADOconnection with TADOTables set to table direct.
>
> I use BDE Set Key() and GotoKey() to extract data from linked tables. I
> would assume there is a similiar method with ADO but I'm not sure which
> they are. All I want to do there is set the current record and goto it.
>
> Also, for some reason, when I loop thru records it seems to go very very
> slow compared to the BDE version. Perhaps I'm not using the right methods.
>
> if(datamod->Table1->FindFirst())
> {
> do
> {
> Application->ProcessMessages();
>
>
> datamod->Table1->FieldValues["T_FIELD"] = 0;
> //...
>
> }while(datamod->Table1->FindNext());
> }
>
> I don't have much experience with ADO (This is my first app really) if
> anyone has any insight or can point me to a good resource to learn more
> about the ADO basics I'd be grateful.
>
>
Technical Details
Message-ID:
<40db2de0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40631630$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,d991247d18e9434d X-Google-Attributes: gid10698b,public From: "James Peterson" <jpeterson@romanmealmilling.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40631630$1@newsgroups.borland.com> Subject: Re: Quick Question: BDE SetKey and Goto Key = ??? With ADO Date: Thu, 24 Jun 2004 14:40:55 -0500 Lines: 58 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 64.21.236.129 Message-ID: <40db2de0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088105952 64.21.236.129 (24 Jun 2004 12:39:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail