TSQLQuery.FieldByName error lazarus / 31-LCL ---------------------------------------------------------------------- Milsa · 2013-10-17 15:07 Please add sqlite.dll to this project from http://sqlite.org/download.html (size limit on this forum). I have problem with this line (program crashes): Code: [Select]ID := SQLQuery1.FieldByName('id').AsInteger;DDL for table is: Code: [Select]CREATE TABLE test1 (     id   INTEGER PRIMARY KEY AUTOINCREMENT,     name TEXT,     hide INTEGER DEFAULT ( 0 ) ); Select command in SQLQuery1 is: Code: [Select]select * from test1 order by namePlease help me. ---------------------------------------------------------------------- BigChimp · 2013-10-17 16:22 Quote from: Milsa on October 17, 2013, 05:07:33 pmSelect command in SQLQuery1 is: Code: [Select]select * from test1 order by nameTry changing it to Code: [Select]select id,name,hide from test1 order by nameDoes that help? ---------------------------------------------------------------------- Milsa · 2013-10-17 16:32 No. It does not help. I hope that it is not bug in Lazarus. ---------------------------------------------------------------------- BigChimp · 2013-10-17 16:50 If I do that and comment out SQLTransaction1.Commit;, it works for me with a certain Laz+FPC version. Edit: oh and a random sqlite3.dll somewhere on my pc, not the latest version from the site. ---------------------------------------------------------------------- Milsa · 2013-10-17 16:54 This line must be uncommented besause INSERT on SQLite requires COMMIT. ---------------------------------------------------------------------- Milsa · 2013-10-17 16:59 Excuse me. It works. I moved transaction one line down. Thank you very much. Transaction changes this SQLQuery and FieldByName can not work.