LastInsertedRowID MySQL return 0

Have anyone successfully used LastInsertedRowID. I only get zero. ??

Try
db.AddRow (“Devices” , row)
Catch error As DatabaseException
ErrorMessage error.Message
end Try
db.CommitTransaction
id = db.LastInsertedRowID

What if you query it before the commit?

1 Like

Thanks Christian . It works