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 MotorsBindingNa vigatorSaveItem _Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
MotorsBindingNa vigatorSaveItem .Click
Try
Me.Validate()
Me.MotorsBindin gSource.EndEdit ()
Me.MotorsTableA dapter.Update(M e.Partsdatabase DataSet.motors)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
End Sub
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'TODO: This line of code loads data into the
'PartsdatabaseD ataSet.motors' table. You can move, or remove it, as
needed.
Me.MotorsTableA dapter.Fill(Me. PartsdatabaseDa taSet.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 MotorsBindingNa vigatorSaveItem _Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
MotorsBindingNa vigatorSaveItem .Click
Try
Me.Validate()
Me.MotorsBindin gSource.EndEdit ()
Me.MotorsTableA dapter.Update(M e.Partsdatabase DataSet.motors)
MsgBox("Update successful")
Catch ex As Exception
MsgBox("Update failed")
End Try
End Sub
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'TODO: This line of code loads data into the
'PartsdatabaseD ataSet.motors' table. You can move, or remove it, as
needed.
Me.MotorsTableA dapter.Fill(Me. PartsdatabaseDa taSet.motors)
End Sub
End Class
Comment