[Gambas-user] DataView Help
adamnt42 at gmail.com
Wed Jul 12 05:13:31 CEST 2023
On 12/7/23 10:41 am, Denis Crowther wrote:
> The Sqlite documentation says "If a separate thread performs a new
> INSERT on the same database connection" results are unpredictable.
> Wouldn't the "on the same database connection" make LastInsertID
> reliable unless you closed the connection first?
No, that is an example of "It is a dog therefor it is an animal" is not
the same as "It is an animal therefor it is a dog". Also it depends on
what the writers were meaning when they used the term "connection."
The fact is, sqlite LastInsertID IS reliable. It will return the id of
the last record inserted in the table. Which is not quite the same as
"the id of the record that I just inserted in the table".
I just thought of another (underline) possible way to do this. Include a
timestamp field in the record set by the program and match on that.
Maybe. I don't know, it would depend on how accurate sqlite is with
timestamps as they are stored, like almost everything else, as strings.
More information about the User