Subject Re: TIB_Query vs. TIBOQuery???
Author Simon Benedicic
--- In, "gsndelphicoder" <branden@...> wrote:
> This issue is only with the first time the query is opened.


There is a very "bad" sql in daIBO.pas that causes Firebird / Interbase to fetch all data from database in some cases.

Just edit daIBO.pas like this and you will see big improvements in ReportBuilder performance:

{ TdaIBODataSet.SetDataName }

procedure TdaIBODataSet.SetDataName(const aDataName: String);

inherited SetDataName(aDataName);

{dataset cannot be active to set data name}
if GetQuery.Active then
FQuery.Active := False;

{construct an SQL statment that returns an empty result set,
this is used to get the field information }

{ Simon, 2009-06-20, original code ... very slow sql !
WARNING !!! Below fix is only for Firebird ...
use ROWS if you use Interbase
FQuery.SQL.Text := 'SELECT * FROM ' + aDataName +
' WHERE ''c'' <> ''c'' ';
FQuery.SQL.Text := 'SELECT FIRST 0 '+ aDataName+'.* FROM ' + aDataName;

end; {procedure, SetDataName}

Best regards,