Updating databases with datasets

  • Thread starter Thread starter Grant
  • Start date Start date
G

Grant

Hello,

Ive got a recordset containing a table.
I add a new row with 2 of the columns populated, and then add the row to the
datatable - Dataset.Datatable.Rows.Add(newrow)

I then fill in the rest of the columns - currentrow.column3 = "somedata"

I then update the main data source - (datatable.update(dataset))

I can see the new row that has been added and the two columns I initially
populated when I created the row but I dont see the rest of the data. I have
to do another (datatable.update(dataset)) before those columns are updated.

Does anyone know what I am doing wrong here?

Thanks,
Grant
 
Well it seems if you add a row to a table - and then try and update data in
that row - it wont update the main database unless you save twice. I think
it is because when you add it to the database it has a status of 'added' and
the next time around it has the status of 'modified', its as if there is a
queue of transactions. Bazaar thing is my text boxes are all linked to the
dataset.
 
Back
Top