Subject Re: [IBO] TIBOQuery modify Order affects Params
Author Jaimy Azle
On Wednesday, October 29, 2003 10:38 AM teamtlas wrote:

> The problem I am having is that since converting to IBO the first
> "Open" of a query executes fine but after closing the query and
> modifying the "ORDER BY" clause dynamically, the second "Open" causes
> parameter problems

AFAIK, everytime you modify the query statement, you'll need to reprepare
it. What if:

> with IBOQuery1 do
> begin
> close;
+ SQL[10] := 'ORDER BY O.ODESC ASC';
+ prepare;
> Params[0].AsInteger := 0;
> Params[1].AsInteger := 999999999;
> Params[2].AsDateTime := Date;
> Params[3].AsString := '';
> Params[4].AsString := 'zzzzzzzzzzzzzzzzzzzz';
> Params[5].AsInteger := 0;
> Params[6].AsInteger := 999999999;
> Params[7].AsString := 'B';
> open;
> close;
+ SQL[10] := 'ORDER BY O.ODESC DESC';
+ prepare;
> Params[0].AsInteger := 0;
> Params[1].AsInteger := 999999999;
> Params[2].AsDateTime := Date;
> Params[3].AsString := '';
> Params[4].AsString := 'zzzzzzzzzzzzzzzzzzzz';
> Params[5].AsInteger := 0;
> Params[6].AsInteger := 999999999;
> Params[7].AsString := 'B';
> open;
> end;

Salam,

-Jaimy
--
``I would rather concentrate on a single product or very few products
than generate an inferior or low quality group of products.''
-- Ian David Mead