Carl
But in the example you gave the parameter is subst as a literal not a col
name
ie equiv to
select name, 1 from animals.dbf
Also local SQL does not support UNION so it doesn't have the type checking
critciality of full SQL servers
One reason an SQL Parser can't do it is the preparation checks for type
conpatibility
TTFN
Neven
select
----- Original Message -----
From: Carl Reynolds <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, 18 October 2000 16:43
Subject: RE: [DUG]: Query Parameters
> From: Stacey Verner [mailto:[EMAIL PROTECTED]]
> > I wanted
> >
> > select :param, field
> > from table
> >
> > to be the same as
> >
> > select "bob", field
> > from table
> >
> > Alas, this is not the way it works.
>
> Actually, it does work in LocalSQL. Try the following with a TQuery
> (DBDemos database):
>
> select name, :param1
> from animals.dbf
>
> // Set datatype of param1 to integer and paramtype of param1 to input,
> then
>
> query1.parambyname('param1').asinteger := 1;
> query1.open;
> // Angel Fish 1
> // etc.
>
> I raised this same problem a while ago on one of the Interbase newsgroups
> because I thought it was specific to a TIBSQL (an IBX beastie). Got no
> solution though. :-(
>
> Cheers,
> Carl
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"