Lazarus 3.8 IBX 2.7.2.1650
Why do we need the CheckClosed check at the beginning of TIBSQL.ExecQuery?
It doesn't seem to have been there before...
I have a procedure for inserting records into a table that returns the id of the new record.
I run through the grid lines and call the procedure:
IBSQL1.SQL.Text:='select id from from ins_proc(:fld1)';
IBSQL1.Prepare;
with grid do
for r := 1 to RowCount - 1 do
begin
IBSQL1.Params[0].AsString:=Cells[1, r];
IBSQL1.ExecQuery;
newId := IBSQL1.Fields[0].AsInteger; //optional
....
end;
It worked in the old project. But now on the second iteration it says that: IBSQL Open
CheckClosed checks whether the previous ExecQuery has a result.
In my case, it's always there.
I had to comment out the check. Is this the right thing?