Good day!
Im a new programmer in vb.net and it seems that i cant update my table in access 2007 here is my code.
Try
con = new oledb.oledbConnection("Provider = Microsof.ACE.OLEDB.12.0"; data source =
|DAtaDirectory|\Attendance.accdb; Persist Security Info = False;")
con.Open()
sql = "INSERT INTO tblProf VALUES('"&txtEmpNo.Text&"',
'"&txtProfName.text&"','"&txtProfLname.Text&"')"
cmd = New OleDbCommand(sql,con)
icount = cmd.ExecuteNonQuery()
MessageBox.Show(icount)
Catch ex as Exception
Finally
con.close()
ds.dispose()
End Try
--I dont received an error message when i run the codes i even dont receive an exception message. but when i check my database the record was not added.
I hope you can help me. thanks in advance.