Hi all,
Just fixed the previous bug with the DBLookupListBox, now another bizarre one has appeared. Like the last one, I haven’t changed any of my code and this had been working for 2 years prior to upgrading Free Pascal/Lazarus version. I can’t see how fixing the last error could have affected it.
Anyway, this SQLite query:
UserfileLoad.Open;
UserFileLoad.SQL.Text:=('SELECT * FROM MasterProtocol WHERE _rowid_ = :RowParam');
UserFileLoad.Params.ParamByName('RowParam').Value := IssueIndex;
if UserFileLoad.Fieldbyname('Workspace').AsString = 'True' then WorkspaceCheckbox.Checked:= true;
Now complains that the field Workspace doesn’t exist. I’ve added some debugging checks just before the code is executed, which confirm the following regarding UserFileLoad:
The database name is correct;
The query is correct;
The query is opened without error;
RowParam returns a valid record ID;
The query returns all the correct fields;
The dataset is active /1 record returned; and
Correct data is read from the fields!
My code above appears directly after the end of the successful checks; there’s nothing else in between the checks and the above. Yet the checks work and the above code fails due to missing field.
Strangest one I’ve ever seen I think?! Where do I even start?