Parameter in TADOQuery sometimes failes
- From: frank.van.der.schoot@xxxxxxxxxxx
- Date: 27 Oct 2005 02:23:22 -0700
I have a TADOQuery which fails when using a parameter. If I open the
following SQL in a TADOQuery:
SELECT * FROM MyTable WHERE id IN ("ab","ba","ca")
I received 3 records.
But if I introduce a parameter:
SELECT * FROM MyTable WHERE id IN (:IDS)
and pass the string as following:
queryStoringen.Parameters.ParamValues['IDS'] := '"ab","ba","ca"';
queryStoringen.open;
Then I receive no records where I expect the 3 records.
When I execute the following:
queryStoringen.Parameters.ParamValues['IDS'] := 'ab';
queryStoringen.open;
Then I receive one record.
Has anybody a clue why is a list of strings is failing?
Thanks in advance, Frank v/d Schoot
.
- Follow-Ups:
- Re: Parameter in TADOQuery sometimes failes
- From: Riki Wiki
- Re: Parameter in TADOQuery sometimes failes
- Prev by Date: Re: In-Memory Dataset
- Next by Date: Two tiers on the net
- Previous by thread: Read data from Access databas
- Next by thread: Re: Parameter in TADOQuery sometimes failes
- Index(es):
Relevant Pages
|