Article View: borland.public.cppbuilder.database.ado
Article #3846Re: Dynamic SQL - How do I create dynamic SQL statements on the fly?
From: Yuancai (Charlie) Ye
Date: Thu, 06 Jun 2002 16:33
Date: Thu, 06 Jun 2002 16:33
40 lines
2452 bytes
2452 bytes
Hi, Steve:
Why don't try OleDBPro at www.udaparts.com with nenumerous samples. It
will work for you without any problem.
--
Yuancai (Charlie) Ye
See 30 real well-tested advanced OLEDB samples
Use of free SocketPro for creating super client and server application with
numerous samples
www.udaparts.com
"Steve Kothenbeutel" <skothenbeutel@consultant.com> wrote in message
news:3cff342f_2@dnews...
> Hello,
>
> I am trying to create dynamic SQL statements that depend on user input. I
> am aware of the Parameters property in TADOQuery for example... but I am
> unsure how to use it in the following scenario:
>
> A user sends a request for information as such:
>
> select :readfields from table1 where :conditions
>
> considering my ":readfields" and ":conditions", how do I use Parameters to
> fill in these fields when there are more than one field to substitute into
> each tag? What if I had 3 fields I needed to plug into ":readfields".
How
> do I use Parameters to produce this sort of SQL statement? And what if I
> want to use "OR" instead of "AND" in the statement between the field
names?
>
> Thanks in advance!
>
> Steve Kothenbeutel
> skothenbeutel@consultant.com
>
>
>
Technical Details
Message-ID:
<3cff8ee4$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!cox.net!newspeer1-gui.server.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3cff342f_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,a8d67f18caa8caff X-Google-Attributes: gidfcd2b,public X-Google-Thread: f6386,a8d67f18caa8caff X-Google-Attributes: gidf6386,public X-Google-Thread: 10698b,a8d67f18caa8caff X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-06-06 09:40:35 PST Reply-To: "Yuancai \(Charlie\) Ye" <support@udaparts.com> From: "Yuancai \(Charlie\) Ye" <support@udaparts.com> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.cppbuilder.database.multi-tier,borland.public.delphi.database.multi-tier References: <3cff342f_2@dnews> Subject: Re: Dynamic SQL - How do I create dynamic SQL statements on the fly? Date: Thu, 6 Jun 2002 12:33:38 -0400 Lines: 42 Organization: UDAParts 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: 65.199.245.22 Message-ID: <3cff8ee4$1_2@dnews> X-Trace: dnews 1023381220 65.199.245.22 (6 Jun 2002 09:33:40 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!cox.net!newspeer1-gui.server.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!dnews