Accessing _rowid_
Posted: Tue 16 Sep 2014 11:43
I am querying an sqlite database with the following schema
CREATE TABLE Members (id INTEGER NOT NULL PRIMARY KEY, permanent INTEGER)
My query (via TUniQuery) is "select _rowid_ from members"
The query returns 22 rows
However a subsequent
UniQuery1->FieldByName("_rowid_")->AsString
gives an exception UniQuery1:Field '_rowid_' not found
The same query but on a table without a defined primary key, fails in the same way
The same command in a sqlite shell returns the rowid's
Any idea why this may be?
Thanks
CREATE TABLE Members (id INTEGER NOT NULL PRIMARY KEY, permanent INTEGER)
My query (via TUniQuery) is "select _rowid_ from members"
The query returns 22 rows
However a subsequent
UniQuery1->FieldByName("_rowid_")->AsString
gives an exception UniQuery1:Field '_rowid_' not found
The same query but on a table without a defined primary key, fails in the same way
The same command in a sqlite shell returns the rowid's
Any idea why this may be?
Thanks