last_insert_rowid

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
egrobler
Posts: 26
Joined: Mon 03 Dec 2012 14:35

last_insert_rowid

Post by egrobler » Tue 10 Oct 2017 01:38

To whom it may concern,

I know you have a property TLiteSQL.LastInsertId but I need to get the last inserted id from the TLiteConnection.
Can you please make the SQLite function last_insert_rowid() available in the TLiteConnection class

Best Regards
Eric

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: last_insert_rowid

Post by MaximG » Wed 11 Oct 2017 11:41

To implement the behavior you describe, just use the following query:

Code: Select all

SELECT last_insert_rowid ()

egrobler
Posts: 26
Joined: Mon 03 Dec 2012 14:35

Re: last_insert_rowid

Post by egrobler » Wed 11 Oct 2017 12:12

Works perfectly, thanks

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: last_insert_rowid

Post by MaximG » Wed 11 Oct 2017 12:24

We were glad to help you. Please don't hesitate to contact us with questions concerning LiteDAC usage.

Post Reply