SQLite3 RowID not visible to Zeos?

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
ToodleDoo
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 07.02.2017, 23:40

SQLite3 RowID not visible to Zeos?

Post by ToodleDoo »

Hi,

For a variety of reasons I cannot use an AutoInc field so want to use the inbuilt RowID of SQLite as I need a unique Record-identifier.

I tried using tblLocate('RowID',aRowID,[]); but it returns an error and crashes.

How can I use that RowID?
Ubuntu 14.04-LTS, Acer i5, 6GB, 256GB-SSD, Lazarus 1.6.2, Zeos 7.1
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: SQLite3 RowID not visible to Zeos?

Post by miab3 »

@ToodleDoo,

select rowid,* from table

Michal
ToodleDoo
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 07.02.2017, 23:40

Re: SQLite3 RowID not visible to Zeos?

Post by ToodleDoo »

miab3 wrote:select rowid,* from table
Thanks, but I am converting some Delphi stuff over and it was all written using Dataware and almost no real SQL stuff. I'd have to rewrite tons of stuff.

Doing it free for a friend so do not wan to spend a several days on it. :)
Ubuntu 14.04-LTS, Acer i5, 6GB, 256GB-SSD, Lazarus 1.6.2, Zeos 7.1
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQLite3 RowID not visible to Zeos?

Post by marsupilami »

Hello ToodleDoo,

as far as I know the RowID column is a more or less hidden column that you only can get access to by explicitly selecting it. Zeos will not automatically change your SQL for you. So either you find some option in sqlite to enable returning RowID at all times or you live without RowID or you modify your code to explicitly select it when you need it.

Best regards,

Jan
Post Reply