O
Octavius Khan
I'm fairly new to VB.Net 2005 development and I am in need of updating MS
Access 2000 data via code. This was easy to do in my prior programming
language, but I am stuck here.
I am using the following test code that when a button is pushed, the
contents of the Customer_ID field is changed. Well, it does change. I have
a datagrid on Windows Form connected to an Access database and the chage
occurs, but is not saved. When I exit the program and re-run it, the old
data remains.
Thanks for any assistance.
Private Sub btn_GetCustomerInfo_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btn_GetCustomerInfo.Click
Dim MyData As DataRow
Dim MyString As String
MyData = ds_Binding.Tables(0).Rows(CARES_BindingSource.Position)
MyString = MyData("Customer_ID")
MessageBox.Show(MyString)
'Change It's Value
MyData("Customer_ID") = "123456789"
MyData.AcceptChanges()
End Sub
Access 2000 data via code. This was easy to do in my prior programming
language, but I am stuck here.
I am using the following test code that when a button is pushed, the
contents of the Customer_ID field is changed. Well, it does change. I have
a datagrid on Windows Form connected to an Access database and the chage
occurs, but is not saved. When I exit the program and re-run it, the old
data remains.
Thanks for any assistance.
Private Sub btn_GetCustomerInfo_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btn_GetCustomerInfo.Click
Dim MyData As DataRow
Dim MyString As String
MyData = ds_Binding.Tables(0).Rows(CARES_BindingSource.Position)
MyString = MyData("Customer_ID")
MessageBox.Show(MyString)
'Change It's Value
MyData("Customer_ID") = "123456789"
MyData.AcceptChanges()
End Sub