SQLite:Unexpected Column Not Found After Upgrading To Lazarus 3.4 lazarus / 16-Databases ---------------------------------------------------------------------- Wilko500 · 2024-07-03 16:18 Background I have a working program to migrate MS Access database data to SQLite that has been ok for many months.  A change was required to the SQLite data structure so I re-ran the "working" program but had problems with the following line but only on the second call to the function. 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   iRes:= dbQuery.FieldByName(strKey).AsString;  //This failing for ColUnits The SQL for the query was correct, copied from ShowMessage and run in the database browser, producing the expected output.  After several hours of frustrated head scratching I hard coded a fix to jump over this troublesome piece of code. Next I started getting Operation cannot be performed on active dataset. Searching the forum I found this from BigChimp, 2012 Quote    QDetail.Close;       QDetail.SQL.Text:=Format(AdresLatest, [inttostr(NameID)]);       QDetail.Open; and this from Knipfty on the same post QuoteI've found that anytime you change the SQL Text property, the dataset needs to be closed.  The IDE does this automatically and forces you to set active to true to see the result.  It doesn't surprise me that you need to do this programically as well. Putting .close in before each of my SQL.Text statements fixed all my problems.  It seems to me that there has been some kind of change within the IDE and possible the version of FPC I was using (maybe Laz- FPC 3.3.1-3.9.9 not certain of the version) and the Laz-FPC 3.4-3.2.2 I use currently. Are internal changes such as these documented and if so where? Huge thanks to both BigChimp and Knipfty ---------------------------------------------------------------------- H₂SO₄ · 2024-07-04 04:49 Quote from: Wilko500 on July 03, 2024, 06:18:31 pmAre internal changes such as these documented and if so where? You can always look through the commit history of the compiler source tree on GitLab; or more specifically, that of the  fcl-db  package which contains the database units. ---------------------------------------------------------------------- af0815 · 2024-07-04 06:38 Quote from: Wilko500 on July 03, 2024, 06:18:31 pmPutting .close in before each of my SQL.Text statements fixed all my problems.  To close the Query before i change a statement (or add) was normal for ages for me (exactly since my Delphi 7 times). Maybe it was accepted by accident sometimes, so it was no internal change - more a bugfix :-)