I found a major problem: active query doesn't close when SQL.Text property is assigned. I think it's related to this thread: viewtopic.php?t=143732
If I create table like this:
Code: Select all
With ZQuery1 do
begin
SQL.Text := 'create table zeostest (fint1 int, fint2 int, primary key (fint1))';
ExecSQL;
SQL.Text := 'insert into zeostest (fint1, fint2) values (:fint1, :fint2)';
Prepare;
ParamByName('fint1').AsInteger := 1;
ParamByName('fint2').AsInteger := 10;
ExecSQL;
ParamByName('fint1').AsInteger := 2;
ParamByName('fint2').AsInteger := 20;
ExecSQL;
ParamByName('fint1').AsInteger := 3;
ParamByName('fint2').AsInteger := 30;
ExecSQL;
end;
Code: Select all
With ZQuery1 do
begin
SQL.Text := 'select * from zeostest where fint1 = :fint1';
ParamByName('fint1').AsInteger := 1;
Open;
WriteLn(FieldByName('fint2').AsString);
SQL.Text := 'select * from zeostest where fint1 = :fint1';
ParamByName('fint1').AsInteger := 2;
Open;
WriteLn(FieldByName('fint2').AsString);
SQL.Text := 'select * from zeostest where fint1 = :fint1';
ParamByName('fint1').AsInteger := 3;
Open;
WriteLn(FieldByName('fint2').AsString);
end;
Code: Select all
10
20
30
Code: Select all
10
10
10
I tried to enable ACTIVE_DATASET_SQL_CHANGE_EXCEPTION, but that also don't detect assignment.
How can I turn on behavior like it was in previous Zeos versions?