🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to use parameters in TADOQuery

#3093
From: Dmitry
Date: Tue, 17 Dec 2002 06:53
27 lines
1750 bytes
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: <3dfecc40@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,d6b087b7370736cc,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-12-16 23:09:37 PST
From: "Dmitry" <programmer@mail.spbnit.ru>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: How to use parameters in TADOQuery
Date: Tue, 17 Dec 2002 09:53:30 +0300
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 212.48.199.222
Message-ID: <3dfecc40@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040108608 212.48.199.222 (16 Dec 2002 23:03:28 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail