Subject Re: [IBO] TIBOQUERY Problem
Author Artur Anjos
Just a quick look:

I use to prepare the query first before setting any parameters, you are preparing after.

Your way:

datasource.dataset.disablecontrols;
with IBOQuery1 do begin
close;
with sql do begin
clear;
add('select * from s2000 where s_date = :mdate);
end;
parambyname('mdate').asdate:=adatevar;
prepare;
open;
end;
datasource.dataset.enablecontrols;

My way:

datasource.dataset.disablecontrols;
with IBOQuery1 do begin
close;
with sql do begin
clear;
add('select * from s2000 where s_date = :mdate);
end;
prepare;
parambyname('mdate').asdate:=adatevar;
open;
end;
datasource.dataset.enablecontrols;

I always think that the query must be prepared before setting any parameters. Am I wrong?

Artur


[Non-text portions of this message have been removed]