trimakassi
Programmer
I get an error everytimes i try to update my dataset to msaccess.
here is the code:
Dim dRow As DataRow
row = DsSpendings1.Tables(0).Rows.Count()
dRow = DsSpendings1.Tables(0).NewRow
dRow("Date") = CDate(txtDate.Text)
dRow("Transaction") = row
'filter to get the store name
DsStores1.Tables(0).DefaultView.RowFilter = "store = '" & cboStore.Text & "'"
'getting the store id
dRow("Store") = CInt(DsStores1.Tables(0).DefaultView.Item(0)(2))
dRow("Amount") = CInt(txtAmount.Text)
dRow("Receipt") = CStr(txtreceipt.Text)
dRow("Memo") = CStr(txtMemo.Text)
DsSpendings1.Tables(0).Rows.Add(dRow)
'Me.BindingContext(DsSpendings1, "DbSpendings").AddNew()
OleDbDataAdapter1.Update(DsSpendings1)
thanks
Trimakassi
Boston
here is the code:
Dim dRow As DataRow
row = DsSpendings1.Tables(0).Rows.Count()
dRow = DsSpendings1.Tables(0).NewRow
dRow("Date") = CDate(txtDate.Text)
dRow("Transaction") = row
'filter to get the store name
DsStores1.Tables(0).DefaultView.RowFilter = "store = '" & cboStore.Text & "'"
'getting the store id
dRow("Store") = CInt(DsStores1.Tables(0).DefaultView.Item(0)(2))
dRow("Amount") = CInt(txtAmount.Text)
dRow("Receipt") = CStr(txtreceipt.Text)
dRow("Memo") = CStr(txtMemo.Text)
DsSpendings1.Tables(0).Rows.Add(dRow)
'Me.BindingContext(DsSpendings1, "DbSpendings").AddNew()
OleDbDataAdapter1.Update(DsSpendings1)
thanks
Trimakassi
Boston