Article View: borland.public.cppbuilder.database.ado
Article #3101Re: How to use parameters in TADOQuery
From: Vassiliev V.V.
Date: Tue, 17 Dec 2002 17:12
Date: Tue, 17 Dec 2002 17:12
60 lines
3071 bytes
3071 bytes
>But if need in query two parameters i have to create > fake field in master query by means AS (alias) and use the alias as second > parameter(with the other name) in subordinated query. Parameter is not field and fields are not directly related with parameters. In Access you can define parameters inside query (that is not BDE-like syntax ":param" that is supported by ADO Express). Your query will look like: Parameters Param1 Int; SELECT * FROM detail_table WHERE address_id =Param1 AND something_else =Param1 ---------------------------------------------------------------- Regards, Viatcheslav V. Vassiliev http://www.oledbdirect.com The fastest way to access MS SQL Server, MS Jet (MS Access) and Interbase (LCPI provider, http://ibp.lcpi.lipetsk.ru) databases. "Dmitry" <programmer@mail.spbnit.ru> �������/�������� � �������� ���������: news:3dff15d6@newsgroups.borland.com... > > > ADO Express replaces :variable with ? in SQL query, so you need to use 2 > > different but equal parameters. > > Yes but in this case i need to write code and manually assign parameters > before activating > query. > What i like now is that i dont need to write code for subordinated query if > use > only one parameter. But if need in query two parameters i have to create > fake field in master query by means AS (alias) and use the alias as second > parameter(with the other name) in subordinated query. > > It is not nice for me. > I interested if there is special methodics for that. > Maybe somethere there is event where it is possble to deal with parameters > before dataset activating? > Maybe there is some ADO Express descendant components which decide this > problem? > > My goal is not to write specific C++ code and use visual possibilities of > Builder. > > Dmitry > > > > > > > > > > > >
Technical Details
Message-ID:
<3dff66dd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3dfecc40@newsgroups.borland.com> <3dfee4ba@newsgroups.borland.com> <3dff15d6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,d6b087b7370736cc X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-12-17 10:12:29 PST From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> Newsgroups: borland.public.cppbuilder.database.ado References: <3dfecc40@newsgroups.borland.com> <3dfee4ba@newsgroups.borland.com> <3dff15d6@newsgroups.borland.com> Subject: Re: How to use parameters in TADOQuery Date: Tue, 17 Dec 2002 20:12:19 +0300 Lines: 62 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 212.188.99.23 Message-ID: <3dff66dd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1040148189 212.188.99.23 (17 Dec 2002 10:03:09 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail