Article View: borland.public.cppbuilder.database.ado
Article #5675Re: Preparing querys..... but with select statements
From: Neo
Date: Wed, 07 Mar 2001 15:41
Date: Wed, 07 Mar 2001 15:41
31 lines
2014 bytes
2014 bytes
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:
<3aa6578a_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!38.166.43.102References:
<3aa5134d_1@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 07:56:09 PST From: "Neo" <klink_stalag13@nospam_yahoo.com> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.cppbuilder.database.desktop References: <3aa5134d_1@dnews> Subject: Re: Preparing querys..... but with select statements Date: Wed, 7 Mar 2001 10:41:37 -0500 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 38.166.43.102 Message-ID: <3aa6578a_2@dnews> X-Trace: 7 Mar 2001 07:45:14 -0800, 38.166.43.102 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!38.166.43.102