Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatamacDataSet.JACK' table. You can move, or remove it, as needed.
Me.JACKTableAdapter.Fill(Me.DatamacDataSet.JACK)
'TODO: This line of code loads data into the 'DataDataSet.BH' table. You can move, or remove it, as needed.
'TODO: This line of code loads data into the 'DataDataSet.JACK' table. You can move, or remove it, as needed.
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
JACKBindingSource.AddNew()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
JACKBindingSource.RemoveCurrent()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Try
JACKBindingSource.EndEdit()
MessageBox.Show("บันทึก")
Catch ex As Exception
MessageBox.Show(" บันทึกไม่ได้ !")
End Try
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Me.Close()
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
JACKTableAdapter.Update(DatamacDataSet.JACK)
End Sub
Private Sub JACKBindingNavigatorSaveItem_Click_1(sender As Object, e As EventArgs) Handles JACKBindingNavigatorSaveItem.Click
Me.Validate()
Me.JACKBindingSource.EndEdit()
Me.TableAdapter.Update(Me.DatamacDataSet.JACK)
End Sub
Private Function TableAdapter() As Object
Throw New NotImplementedException
End Function
End Class
เวลาลบข้อมูลแล้วกดบันทึกการแก้ไข มันทำไม่ได้ครับ
Tag : .NET, Ms Access, Win (Windows App), VB.NET, Windows