Hi. I'm new to VB.Net.
I've used the youtube tutorial coding here: http://www.youtube.com/watch?v=BVS2_PdjlWQ
MsgBox says that the record has been added but my listbox is still empty and the db is not updated. How's that going to be fixed?
PLEASE HELP. Here's my code:
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
ViewEmpDetails.TblEmpDetailsTableAdapter.Insert(Me.txtEmpID.Text, Me.txtLastName.Text, _
Me.txtFirstName.Text, Me.txtMidName.Text, _
Me.txtAddress.Text, Me.txtBirthday.Text, _
Me.txtContact.Text, Me.txtStatus.Text, _
Me.txtCitizenship.Text, Me.txtTin.Text, _
Me.txtPagibig.Text, Me.txtSSS.Text, _
Me.txtPhilHealth.Text, Me.txtPagibig.Text)
ViewEmpDetails.TblEmpDetailsTableAdapter.Fill(ViewEmpDetails.Time_and_AttendanceDataSet.tblEmpDetails)
MsgBox("Record has been Added")
For Each item As Control In Me.Controls
If TypeOf item Is TextBox Then
item.Text = String.Empty
End If
Next
Me.Close()
ViewEmpDetails.Show()
End Sub
!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).