Subject Re: [IBO] Parameter in 'in' clause?
Author H.Klomann
Hi Oliver,

> Is there a way to have a parameter for an 'in' clause that expands to a

No, that´s not possible. But you can form your initial SQL like

"select id,info from tbl_info"

and than add your search criteria whith

IB_Query1.SqlWhereItems.Add('where id in (1,2,3,4)');


Cheers
Harald


Oliver Sturm schrieb:
>
> Hi!
>
> Is there a way to have a parameter for an 'in' clause that expands to a
> string? Here's what I mean: I have a dialog that lets the user select a
> number of depots from a list. I'd like a query that gets further information
> about these depots from a table (or several in reality). This could look like
>
> select id, info from tbl_info
> where id in (:ids)
>
> Now, I'd like to construct a string like '1, 3, 5' programatically and use
> it for the parameter:
>
> quInfo.ParamByName ('ids').AsString := '1, 3, 5';
>
> Is there a way to do this or something similar enough to be helpful?
>
> Oliver Sturm
>
> --
> Fa. Manfred Dahlhoff - Buellenkothenweg 37a - 40229 Duesseldorf
> Tel.: 0211-2202821 - Fax: 0211-2202822 - http://www.Manfred-Dahlhoff.de
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/