Article View: borland.public.cppbuilder.database.ado
Article #4110How to write a select statement to search ....
From: Daniel Zhou
Date: Wed, 20 Mar 2002 04:11
Date: Wed, 20 Mar 2002 04:11
21 lines
1368 bytes
1368 bytes
Hi,
I want to search a substring in a table. How can I write a select statement
to do it?
For example:
I want to find all record in Table Content where Content.Field1 include the
substring "Test it".
Is it correct:
Select * from content where "Test it" in field1.
How can I write it in C++ Builder?
ADOQuery -> SQL->ADD("Select * from Content where :field1 in field1");
ADOQuery->Parameters->ParamByName("field1")->Value= "Test it";
ADOQuery -> Open();
Please help me?
thanks!
Daniel
Technical Details
Message-ID:
<3c980ae5_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!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,d18756633b55898c,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-03-19 20:07:33 PST From: "Daniel Zhou" <langou@gmx.de> Newsgroups: borland.public.cppbuilder.database.ado Subject: How to write a select statement to search .... Date: Wed, 20 Mar 2002 12:11:56 +0800 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 61.165.104.203 Message-ID: <3c980ae5_2@dnews> X-Trace: dnews 1016597221 61.165.104.203 (19 Mar 2002 20:07:01 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews