
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 0.54 KB | hits: 15 | expires: Never
How to add row to Dataset? [closed]
Private Function LoadtoDataset(ByVal _type As String)
Try
Dim ds As New DSProducts
Dim dr As DataRow
dr = ds.Tables("DailyTransaction").NewRow
dr("ProductCode") = ProdID
dr("ProductName") = lblProductName.Text
dr("Quantity") = txtQuantity.Text
dr("Type") = _type
ds.Tables("DailyTransaction").Rows.Add(dr)
Me.DialogResult = Windows.Forms.DialogResult.OK
'Me.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Try
Return Nothing
End Function