I have a solution, thanks to Alex Smith. This works: sqliteCmd.CommandText = "INSERT INTO " .... System.Data.SQLite.SQLiteTransaction sqliteTran = sqliteConnection.BeginTransaction(); sqliteCmd.ExecuteNonQuery(); long lKeyID = sqliteConnection.LastInsertRowId; sqliteTran.Commit(); stKeyID = lKeyID.ToString();
This does not require SQLite3. Thanks to all on the SQLite Mailing List! Clyde On Tue, Feb 7, 2017 at 6:17 PM, Kevin Benson <kevin.m.ben...@gmail.com> wrote: > On Tue, Feb 7, 2017 at 4:11 PM, Clyde Eisenbeis <cte...@gmail.com> wrote: > >> int iKeyID = (int)sqliteCmd.ExecuteScalar(); >> > > I believe the type of last_insert_rowid() is *always* INT64 > > -- > -- > -- > --Ö¿Ö-- > K e V i N > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users