I am new to VB 2012, trying to update an Access Database mdb file on a VS Express 2012 Windows Desktop Form, using a Win 8 computer.
Everything looks good (Field shows as updated) until I exit the project and then restart the project. The database field that I updated does not reflect the changes I made when the project is restarted.
Here is the code I am using. Why is the original database table not being updated?????? Thanks for your help!!!!!!!!!!!!!!
Public Class Form1
Public Sub New()
InitializeComponent()
Me.CenterToParent()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Customer_FileTableAdapter.Fill(Me._DEI_DatabaseDataSet.Customer_File)
End Sub
Private Sub Customer_FileBindingNavigatorSaveItem_Click_1(sender As Object, e As EventArgs) Handles Customer_FileBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.Customer_FileBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me._DEI_DatabaseDataSet)
Me._DEI_DatabaseDataSet.AcceptChanges()
MsgBox("Update OK")
Catch ex As Exception
MsgBox("Problem Occurred: " & ex.Message)
End Try
End Sub
End Class
Everything looks good (Field shows as updated) until I exit the project and then restart the project. The database field that I updated does not reflect the changes I made when the project is restarted.
Here is the code I am using. Why is the original database table not being updated?????? Thanks for your help!!!!!!!!!!!!!!
Public Class Form1
Public Sub New()
InitializeComponent()
Me.CenterToParent()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Customer_FileTableAdapter.Fill(Me._DEI_DatabaseDataSet.Customer_File)
End Sub
Private Sub Customer_FileBindingNavigatorSaveItem_Click_1(sender As Object, e As EventArgs) Handles Customer_FileBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.Customer_FileBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me._DEI_DatabaseDataSet)
Me._DEI_DatabaseDataSet.AcceptChanges()
MsgBox("Update OK")
Catch ex As Exception
MsgBox("Problem Occurred: " & ex.Message)
End Try
End Sub
End Class