SQLite3 RowID not visible to Zeos?

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

SQLite3 RowID not visible to Zeos?

Postby ToodleDoo » 15.02.2017, 18:54

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: 916
Joined: 11.05.2012, 12:32
Location: Poland

Re: SQLite3 RowID not visible to Zeos?

Postby miab3 » 15.02.2017, 21:18

@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?

Postby ToodleDoo » 15.02.2017, 22:21

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
Gold Boarder
Gold Boarder
Posts: 589
Joined: 17.01.2011, 14:17

Re: SQLite3 RowID not visible to Zeos?

Postby marsupilami » 16.02.2017, 00:22

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


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: No registered users and 1 guest