Subject Re: [IBO] Setting Parameters on before open in TIBOQuery
Author Luiz
You can get rid off the parameter and OnPrepareSQL event do:

qry.sqlwhereitems.add('Value='+inttostr(your_int_value))

Luiz.

----- Original Message -----
From: "equator9" <john@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, April 11, 2002 4:47 PM
Subject: [IBO] Setting Parameters on before open in TIBOQuery


> Hi All,
>
> Delphi 5 Ent, Interbase 6.0.1.6, IBO 4.2.b
>
> I am finally getting to convert my BDE based application to use IBO.
>
> I am having difficulty in this part of the conversion.....
>
> I was using the (BDE) TQuery and setting a parameter in the Before
> open event:
>
> AQuery.Parabyname('value').asinteger := 123;
>
> but using the TIBOQuery with the before open event, the value is not
> used (no results returned), unless I set an explicit open too:
>
> AQuery.Parabyname('value').asinteger := 123;
> AQuery.Open;
>
> What event should I use to set the Parameter in the Query, without
> adding another open?
>
> The order of events seems to be different from the BDE - What is the
> IBO order of events when you use the IBOQuery?
>
> Many thanks for any help...
>
> John
>