T
Ted
This is driving me nuts. I've tried everything I can think of. I'm
using VS.net2005 and I backtracked to trying code straight out of the
Microsoft "simple data application" tutorials with no luck.
I have a simple single table access database added to my project, drag
the datasource onto a form everything is created beautifully I can
navigate through the records, modify things, click the save button
etc... but no changes are ever written to the database. If I stop and
restart the app, I'm right back where I started. Below is the entire
form1 that was created by default, all I added was the try/catch and
messageboxes.
Public Class Form1
Private Sub MotorsBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
MotorsBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.MotorsBindingSource.EndEdit()
Me.MotorsTableAdapter.Update(Me.PartsdatabaseDataSet.motors)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'PartsdatabaseDataSet.motors' table. You can move, or remove it, as
needed.
Me.MotorsTableAdapter.Fill(Me.PartsdatabaseDataSet.motors)
End Sub
End Class
using VS.net2005 and I backtracked to trying code straight out of the
Microsoft "simple data application" tutorials with no luck.
I have a simple single table access database added to my project, drag
the datasource onto a form everything is created beautifully I can
navigate through the records, modify things, click the save button
etc... but no changes are ever written to the database. If I stop and
restart the app, I'm right back where I started. Below is the entire
form1 that was created by default, all I added was the try/catch and
messageboxes.
Public Class Form1
Private Sub MotorsBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
MotorsBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.MotorsBindingSource.EndEdit()
Me.MotorsTableAdapter.Update(Me.PartsdatabaseDataSet.motors)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'PartsdatabaseDataSet.motors' table. You can move, or remove it, as
needed.
Me.MotorsTableAdapter.Fill(Me.PartsdatabaseDataSet.motors)
End Sub
End Class