Subject Re: [IBO] debugging queries
Author Helen Borrie
At 02:03 PM 22-09-02 +0000, you wrote:
>I use IBO 3 and FB 1.
>I have a (rather complex) query that works ok when executed directly
>against a database.
>However, when I use parameters, the result is different from what
>Is there a way to see the query formed by IBO (and sent to the
>database) after parameters are set ?
>I hope I am not saying something stupid here. I mean something like
>if I write
> q:TIB_Query;
> q:=TIB_Query.Create(nil);
> with q do
> try
> DatabaseName:='db';
> Sql.Add('select * from ATable where AField=:field_value');
> Prepare;
> ParamByName('field_value').AsString:='blah'; {1}
> Open;
> ...
> finally
> Free;
> end;
>I suppose than in {1} IBO will change the SQL text into
>select * from ATable where AField='blah'
>My question is: is it possible to have a look of the finished SQL
>text in order to debug the code ?

Yes. Use a TIB_MonitorDialog component on your form or data module. Put
IB_Monitor1.Show in your FormCreate. Comment it out when you don't need it.