Article View: borland.public.cppbuilder.database.ado
Article #3812TADOQuery problem
From: Bart Huls
Date: Fri, 31 May 2002 10:58
Date: Fri, 31 May 2002 10:58
40 lines
1961 bytes
1961 bytes
Hi,
I'm doing the query below (it works with the BDE) only when I'm
Open the query is result with an exception:
..Arguments are from the wrong type, ... or have a confict with each
other....
lanstat_id in an INT in my informix database.
if (ADOQuery1)
{
ADOQuery1->Close();
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add("Select * from landstation where landstat_id =
:stat_id;");
ADOQuery1->Prepare();
first = time(NULL);
for(int i=1000 ; ((i < 100000) && (!isClosing)) ; i++)
{
ADOQuery1->Close();
ADOQuery1->Params->Items[0]->AsInteger = i;
ADOQuery1->Open();
while (!ADOQuery1->Eof)
{
StatId=ADOQuery1->FieldByName("landstat_id")->AsInteger;
Name =ADOQuery1->FieldByName("landstat_name_wmo")->AsString;
Result=IntToStr(StatId)+AnsiString(" ")+Name;
ListBox1->Items->Add(Result);
ADOQuery1->Next();
Application->ProcessMessages();
}
}
ADOQuery1->Close();
second = time(NULL);
Msg=Msg.sprintf("The difference is: %f seconds",difftime(second,first));
Caption=Msg;
}
Technical Details
Message-ID:
<3cf7575c$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,1afb85e7b02f3c0d,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-05-31 04:10:02 PST From: "Bart Huls" <b.huls@meteo.nl> Newsgroups: borland.public.cppbuilder.database.ado Subject: TADOQuery problem Date: Fri, 31 May 2002 10:58:37 -0000 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 NNTP-Posting-Host: 194.171.5.140 Message-ID: <3cf7575c$1_2@dnews> X-Trace: dnews 1022842716 194.171.5.140 (31 May 2002 03:58:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!dnews