Add colmn to dataset table

rmatthew

Well-known member
Joined
Dec 30, 2002
Messages
115
Location
Texas
I need to add a column to a table in a dataset ?? I know this is probably trivial; but I cant seem to find out how :)

Thanks
 
First create a new instance of the DataColumn class, then use
the Add method of the DataTables Columns collection to add the
new column to the table.

Code:
Dim newColumn As New DataColumn("name")

myDataSet.Tables(0).Columns.Add(newColumn)
 
Back
Top