Article View: borland.public.cppbuilder.database.ado
Article #5114clearing a Query
From: Guy
Date: Sun, 15 Jul 2001 13:13
Date: Sun, 15 Jul 2001 13:13
21 lines
1656 bytes
1656 bytes
I would like to know how can I use the same TADOQuery component for more
then one Query ? (tried to use clear function but it just didn't work)
My source code looks like this:
Form1->ADOQuery1->Parameters->ParamByName("parameter1")->Value =
Name;
Form1->ADOQuery1->Close();
Form1->ADOQuery1->SQL->Clear();
Form1->ADOQuery1->SQL->Add("insert into Table1 (Name) values
(:parameter1)");
Form1->ADOQuery1->ExecSQL();
When I try to use this function more than one time, it seems that Clear()
doesn't work and therefore ExecSQL stucks because it gets
two rows.
In addition to that, how can I write the Query at design time in the SQL
property ? (This should solve the problem, I guess)
Thanks Guy
Technical Details
Message-ID:
<3b518911_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!216.218.192.242!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,4d93d397933a85e1,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-07-15 05:14:51 PST Reply-To: "Guy" <guy_kariv@hotmail.com> From: "Guy" <guy_kariv@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: clearing a Query Date: Sun, 15 Jul 2001 15:13:09 +0200 Lines: 23 Organization: Student 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: 213.8.240.13 Message-ID: <3b518911_1@dnews> X-Trace: dnews 995199249 213.8.240.13 (15 Jul 2001 05:14:09 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!216.218.192.242!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews