Dataset does not update the table

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

People ...help me. This seems simple but yet I cannot update the table. I
can see the change in

the dataset when I display it on the datagrid. But all fails when it
executes the last line....... I cannot get it

Help please ( here is the last lines of the code)



Dim xrow As DataRow

xrow = LogDs2.Tables("Acc_Checking").NewRow()

xrow("PinNumber") = 11

xrow("TransactDate") = Now.Date

xrow("Credit") = 20

xrow("Debit") = 30

xrow("Cbalance") = 40

LogDs2.Tables("acc_checking").Rows.Add(xrow)

DataGrid1.SetDataBinding(LogDs2, "acc_checking")

oleDBDataadapter2.Update(LogDs2, "acc_checking")
 
Have you confirmed the DataRow is in the DataTable AND marked as Added?

If yes, there is something wrong with your SQL Update statement(s).
 
Back
Top