Getting last inserted ID
问题 I'm currently using the method below to get the ID of the last inserted row. Database.ExecuteNonQuery(query, parameters); //if another client/connection inserts a record at this time, //could the line below return the incorrect row ID? int fileid = Convert.ToInt32(Database.Scalar("SELECT last_insert_rowid()")); return fileid; This method has been working fine so far, but I'm not sure it's completely reliable. Supposing there are two client applications, each with their own separate database