🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Preparing querys..... but with select statements

#5667
From: Jorge Leibowich
Date: Tue, 06 Mar 2001 16:41
23 lines
1828 bytes
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: <3aa5134d_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!200.55.11.100

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,724878896f80d4db,start
X-Google-Attributes: gid10698b,public
X-Google-Thread: 10bf25,724878896f80d4db,start
X-Google-Attributes: gid10bf25,public
X-Google-ArrivalTime: 2001-03-06 08:43:50 PST
From: "Jorge Leibowich" <jorge@lid.com.ar>
Newsgroups: borland.public.cppbuilder.database.ado,borland.public.cppbuilder.database.desktop
Subject: Preparing querys..... but with select statements
Date: Tue, 6 Mar 2001 13:41:36 -0300
Lines: 25
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: <3aa5134d_1@dnews>
X-Trace: 6 Mar 2001 08:41:49 -0800, 200.55.11.100
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!200.55.11.100