Is there any reasonable way to automatically get autoinc values after inserting into table?
ds2.Groups.AddGroupsRow(...);
ds2.Groups.Update();
this reloads table completely and gets new ids obviously, but it doesn't feel good
ds2.Groups.Clear();
ds2.Groups.Fill();
there is autoinc ID field in the table
getting autoinc value
You are right, the mentioned code doesn't look good. But SQLite engine doesn't support SQL for updating result set with the values generated in the database for the autoincrement columns. So, your code can be solution.
The SQLiteCommand class includes the InsertID property which returns the rowid of the most recent successful INSERT into the database. This is just for information (it doesn't help in this situation).
The SQLiteCommand class includes the InsertID property which returns the rowid of the most recent successful INSERT into the database. This is just for information (it doesn't help in this situation).