Click to See Complete Forum and Search --> : Only first record in DataSet is updated


Funkymonkey
03-13-2006, 08:50 AM
I'm trying to update all records in the dataset but only the first one is updated.

If dsOld.Tables("table").Rows.Count > 0 Then

'sqlConn1.Open()
Dim CB As New SqlCommandBuilder(Adapter)
' Adapter.Fill(dsOld, "table")

'Add email info to database
Row = dsOld.Tables("table").Rows(0)
Row.Item("Old") = 1

' dsOld.Tables("table").Rows.Add(New)
Adapter.Update(dsOld, "table")

The 'Old' field is updated for the first record returned by the dataset but not the second?

Thanks for any ideas

Funkymonkey
03-13-2006, 09:35 AM
I did this:
For Each Row In dsOld.Tables("table").Rows
Works now :)