IBSQL - CheckClosed lazarus / 16-Databases ---------------------------------------------------------------------- sydenis · 2025-02-09 16:41 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: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i IBSQL1.SQL.Text:='select id from from ins_proc(:fld1)';IBSQL1.Prepare; with grid dofor r := 1 to RowCount - 1 dobegin  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? ---------------------------------------------------------------------- Zoran · 2025-02-09 21:36 As IBX is now in github repository, perhaps it's better to report there, as Tony (the IBX author) might miss this post. ---------------------------------------------------------------------- Zvoni · 2025-02-10 07:10 Since when do you use "ExecQuery" on a SELECT?!?!?! And isn't that method called "ExecSQL"? ---------------------------------------------------------------------- sydenis · 2025-02-10 07:40 Quote from: Zvoni on February 10, 2025, 08:10:43 amSince when do you use "ExecQuery" on a SELECT?!?!?! And isn't that method called "ExecSQL"? No. See paragraph 5.4.2.2 in IBX4LazarusGuide.pdf ---------------------------------------------------------------------- tonyw · 2025-02-15 16:25 Please go to https://github.com/MWASoftware/ibx4lazarus/issues/2 to read my response.