Update a Datatable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I update a row in a datatable?
My datatable has 1000 rows so a scan may take too long.
 
Hi,

Use the Datatable.Getchanges method to get the changed rows into a second
table, and use the Dataadapter to update the second table.

HTH

Regards

Joyjit
 
Joyjit,
Can you give me more details, please.
dim ds as dataset
dim table as dataTable = ds.Tables(0)
dt = New DataColumn
dt.Caption = header
dt.ColumnName = header
dt.DataType = System.Type.GetType("String.Type") ' THrows an exception
table.Columns.Add(dt)

table.Rows(ix).ItemArray(columncount - 1) ='R' ' Does nothing

ds.Tables(1) = table.GetChanges ' doesn't compile
 
Back
Top