How can I get lastRowId with FMDB? Method [db lastRowId] always returns 0 for me.
Finally I've found, that lastRowId can be retrieved while connection is opened
[_database open];
[_database executeUpdate:<some query>];
int64_t lastInsertRowId = [_database lastInsertRowId];
[_database close];
return lastInsertRowId;