Article View: borland.public.cppbuilder.database.ado
Article #5676Re: Preparing querys..... but with select statements
From: Jorge Leibowich
Date: Wed, 07 Mar 2001 17:12
Date: Wed, 07 Mar 2001 17:12
40 lines
2252 bytes
2252 bytes
But is very slow!!! I'm changing the sql text every time query that i
do!!!!!
"Neo" <klink_stalag13@nospam_yahoo.com> wrote in message
news:3aa6578a_2@dnews...
> Use Query->SQL->Clear();
> then
> Query->SQL->Add(sql string);
> then
> Query->Open();
> Jorge Leibowich <jorge@lid.com.ar> wrote in message
news:3aa5134d_1@dnews...
> > I'm want to do an applicattion that do about 10000 SELECTS, NOT INSERTS.
> >
> > I'm tested with parametrized querys with "Insert" and it is very faster.
> > But i have a problem with SELECTS.... for example, this works WELL
> >
> > Query->SQL->Text="insert into qwe(field,zxc) values :asd,:zxc"
> > Query->Prepare();
> > for (...100000)
> > {
> > Query->ParamByName("field")->AsInteger=i;
> > Query->ParamByName("zxc")->AsString="...";
> > Query->ExecSQL();
> > }
> > Query->UnPrepare();
> >
> > BUT... If a put the same replacing the text in "select from table where
> > field = :field"
> > and replacing Query->ExecSQL(); to Query->Open(); I do NOT get the
correct
> > RESULT. I'm Getting always the same result, and it is not correct. The
> > QUESTION: The prepare method dont works in
> > Query->Open() method? Only works in ExecSQL ???
> >
> > THANK YOU
> >
> >
>
>
Technical Details
Message-ID:
<3aa66d17$1_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!200.55.11.100References:
<3aa5134d_1@dnews> <3aa6578a_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,724878896f80d4db X-Google-Attributes: gid10698b,public X-Google-Thread: 10bf25,724878896f80d4db X-Google-Attributes: gid10bf25,public X-Google-ArrivalTime: 2001-03-07 09:24:06 PST From: "Jorge Leibowich" <jorge@lid.com.ar> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.cppbuilder.database.desktop References: <3aa5134d_1@dnews> <3aa6578a_2@dnews> Subject: Re: Preparing querys..... but with select statements Date: Wed, 7 Mar 2001 14:12:11 -0300 Lines: 42 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: 200.55.11.100 Message-ID: <3aa66d17$1_2@dnews> X-Trace: 7 Mar 2001 09:17:11 -0800, 200.55.11.100 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!200.55.11.100