Here is the code, any ideas why I get this error?
private SQLiteDataAdapter DA_Webfiles;
// Setup connection, fill dataset etc
DataTable dt = this.dataSet.Tables["WEBFILES"];
DataRow newRow = dt.NewRow();
newRow["PATH"] = _url;
dt.Rows.Add(newRow);
this.DA_Webfiles.Update(this.dataSet, "WEBFILES");
// Works to Here
newRow["CONTENT_TYPE"] = "Test Content Type";
this.DA_Webfiles.Update(this.dataSet, "WEBFILES");
// Get ERROR here - Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
you need: dataAdapter.InsertCommand.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord;
got code clue here: Retrieving Identity or Autonumber Values (ADO.NET)
the table:
the code:
the code above works on multi-insert too. proof-of-concept code: