SQLite rowid. lazarus / 16-Databases ---------------------------------------------------------------------- chrnobel · 2011-09-19 23:07 Hi. I am making a webapplication where I need to know the SQLite rowid. I can address it directly in a SQL sentence, but it is not shown in the dataset (using Zeos). What I would like to achieve is something like: XXX:=DataSource1.DataSet.FieldByName('rowid').As Integer; Any suggestions? ---------------------------------------------------------------------- chrnobel · 2011-09-20 10:11 Ahh, found a solution in a weird moment. If I prepare my query like this: Code: [Select]var   sqlsentence:TstringList;  begin   sqlsentence:=TstringList.create;   sqlsentence.Clear;   sqlsentence.Add('select rowid,* from table');   ZQuery1.ReadOnly:=false;   ZQuery1.SQL:=sqlsentence;   ZQuery1.Active:=true;  end So the trick is simply explicitly to select rowid in the query, if only selecting * it is ignored. Then rowid then becomes part of the dataset as I wanted it.