Subject Re: [IBO] Problems with TIBOQuery.Params
Author Jason Wharton
This is a feature of InterBase itself.
You need to find a different solution.
I recommend you look into using the SQLWhereItems and OnPrepareSQL event.
See the tech info sheet on this or search the archives.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Fabiano Di Grazia Bonin" <fabiano@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, August 24, 2001 9:57 AM
Subject: [IBO] Problems with TIBOQuery.Params


> I'm using a TIBOQuery in a form with the following statement:
>
> select *
> from cad1
> where ( :name = '*' or cad1.name like '%' || :name || '%' )
>
> I want that, when the parameter = '*', it shows all records, and when
> the parameter is another thing, it filter the records.
>
> I noticed that when I prepared the query, IBO creates two params
> called 'name', one type text(1) and the other type vartext(50)
>
> When I assign the value to the parameter (IBOQuery1.ParamByName
> ('name').AsString := 'test' ), then value of the first parameter
> is 't', and the value of the second parameter is not 'test', but some
> unreadable characters.
>
> What's the problem with this?