Subject | Re: [IBO] debugging queries |
---|---|
Author | Helen Borrie |
Post date | 2002-09-22T14:42:47Z |
At 02:03 PM 22-09-02 +0000, you wrote:
IB_Monitor1.Show in your FormCreate. Comment it out when you don't need it.
Helen
>I use IBO 3 and FB 1.Yes. Use a TIB_MonitorDialog component on your form or data module. Put
>
>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
>expected.
>
>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
>this:
>
>if I write
>
>var
> q:TIB_Query;
>begin
> 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;
>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 ?
IB_Monitor1.Show in your FormCreate. Comment it out when you don't need it.
Helen