not too sure why this problem is happening. I can update the dataset from a textbox but then when I click the update button it is showing an error "Object reference not set to an instance of an object." The dataset is empty when I try to run the update. Hope someone can helpme out on this one. code is:-
Private Sub btnSubReturn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubReturn.Click
Dim Qtyint As Integer
Dim QtyRetInt As Integer
Dim Result As Integer
Dim i As Integer
Qtyint = Integer.Parse(Me.txtQty.Text)
QtyRetInt = Integer.Parse(Me.txtQtyReturn.Text)
txtResult.Text = Qtyint + QtyRetInt
Result = txtResult.Text
i = dgLinenStock.CurrentRow.Index
dgLinenStock.Item(4, i).Value = Result
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim Builder As New SqlCommandBuilder(daLinStock)
daLinStock.Update(ds)
End Sub