' Create a new DataTable.
Dim myDataTable As DataTable = New DataTable("temp")
' Declare variables for DataColumn and DataRow objects.
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
Public myDataset As DataSet
Private Sub createtable()
' Create new DataColumn, set DataType, ColumnName and add to DataTable.
myDataColumn = New DataColumn()
myDataColumn.DataType = System.Type.GetType("System.String")
myDataColumn.ColumnName = "Name"
myDataColumn.ReadOnly = True
myDataColumn.Unique = True
' Add the Column to the DataColumnCollection.
myDataTable.Columns.Add(myDataColumn)
End sub
Private Sub addrecord()
myDataRow = myDataTable.NewRow()
myDataRow("Name") = pname.Text
myDataRow("Qty") = pqty.Text
myDataRow("Price") = pprice.Text
myDataTable.Rows.Add(myDataRow)
End Sub
i first created a datatable set then a dataset then i add rows using addrow method.Now i want this temp table frm dataset to be stored in database????
how will i do that.pls
Dim myDataTable As DataTable = New DataTable("temp")
' Declare variables for DataColumn and DataRow objects.
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
Public myDataset As DataSet
Private Sub createtable()
' Create new DataColumn, set DataType, ColumnName and add to DataTable.
myDataColumn = New DataColumn()
myDataColumn.DataType = System.Type.GetType("System.String")
myDataColumn.ColumnName = "Name"
myDataColumn.ReadOnly = True
myDataColumn.Unique = True
' Add the Column to the DataColumnCollection.
myDataTable.Columns.Add(myDataColumn)
End sub
Private Sub addrecord()
myDataRow = myDataTable.NewRow()
myDataRow("Name") = pname.Text
myDataRow("Qty") = pqty.Text
myDataRow("Price") = pprice.Text
myDataTable.Rows.Add(myDataRow)
End Sub
i first created a datatable set then a dataset then i add rows using addrow method.Now i want this temp table frm dataset to be stored in database????
how will i do that.pls