On 2012-03-06 15:20, Pawl wrote:
Hi,
I don't know how to make this EASY thing (for me side) I found only this,
but they said it is solverd, but it isn;t
http://stackoverflow.com/questions/3828098/solved-how-to-return-autoincrement-value-in-insert-query-in-sqlite
I don;t know what I get exception Not supported when I tried to setup
ParameterDirection another then input!
I add this "sqa.InsertCommand.UpdatedRowSource =
UpdateRowSource.FirstReturnedRecord;" before. But without any result!
Try this.
SQLiteCommand command = new SQLiteCommand("INSERT INTO TABLE (FIELD1,
FIELD2) VALUES (:FIELD1, :FIELD2); SELECT LAST_INSERT_ROWID();");
... append parameters ...
int nextValue = command.ExecuteScalar();
Joe D
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users