add row and call its fieldname "ID" to dynamically created dataset
Posted on 2006-03-31
Hi, i want to create a Dataset dynamically,
no problem. i want to add a row called "ID" to my table "MyID"
the problem is adding the row.
i have Row(0) = and this does not work.
i also dont know how to call the row field "ID"
Dim ds As New DataSet
Dim dt As New System.Data.DataTable("MyID")
Dim I As Integer
For I = 0 To ListView1.Items.Count - 1
Dim row As DataRow = ds.Tables("MyID").NewRow()
row(0) = ListView1.Items(I).SubItems(9).Text.Trim.ToUpper