Maybe im just braindead but the following does not work:
// create a connection & insert command
SQLiteCommand IDCmd = new SQLiteCommand("Select sqlite_last_insert_rowid();", conn);
try {
conn.Open();
cmd.ExecuteNonQuery();
p.PrimaryKey = IDCmd.ExecuteScalar();
}
finally {
conn.Close();
conn.Dispose();
}
it throws an error:
System.Data.SQLite.SQLiteException: SQLite error
no such function: sqlite_last_insert_rowid
on the line highlighted in red. what exactly am I doing wrong?