🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3097

Re: How to use parameters in TADOQuery

#3097
From: Vassiliev V.V.
Date: Tue, 17 Dec 2002 08:03
43 lines
2466 bytes
ADO Express replaces :variable with ? in SQL query, so you need to use 2
different but equal parameters.

----------------------------------------------------------------
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:3dfecc40@newsgroups.borland.com...
> Hello ALL,
>
> I want to use mechanism of automatic substitution of parameters
> in Query, which VCL allows to do without code writing.
>
> I.e i use parameters in subordinated query with parameter names
> exact as needed fields in master query and assign Datasorce property
> of the TADOQuery to datasorce of master query.
>
> My problem is that, if i use in the query  parameters with the same name
> twice, the VCL apply  only first one and don't use the other.
> For example:
>
> SELECT * FROM detail_table WHERE address_id =:id AND something else
> is equal =:id
>
> It doesn't work on a practice, because VCL apply
> only first :id parameter.
>
> Do someone know what to do in the situation?
>
> P.S.
> I use MS Access database.
>
> --
> Best regards,
>  Dmitry                          mailto:programmer@mail.spbnit.ru
>
>
>
>
Technical Details
Message-ID: <3dfee4ba@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dfecc40@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 01:09:15 PST
From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3dfecc40@newsgroups.borland.com>
Subject: Re: How to use parameters in TADOQuery
Date: Tue, 17 Dec 2002 11:03:17 +0300
Lines: 45
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.34
Message-ID: <3dfee4ba@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040114874 212.188.99.34 (17 Dec 2002 00:47:54 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail