hi guys,
I got another issue doin my project. Im using Microsoft access as Database. When i need to UPDATE it work and the msgbox displayed: "thank you", but when i looked into the database nothing happened.
Anyone can help me to determine the problem? please
Thanks in advance.
con.Open()
Try
sqlStr = "UPDATE TBValidation SET Time_OUT=@Time_OUT WHERE VTDriverID= ? AND VTDate=? AND VTTime =?"
cmd = New OleDb.OleDbCommand(sqlStr, con)
cmd.Parameters.AddWithValue("@VTDriverID", txtscanbarcode.Text)
cmd.Parameters.AddWithValue("@VTDate", txttripdate.Text)
cmd.Parameters.AddWithValue("@VTTime", TimeString)
cmd.Parameters.AddWithValue("@Timme_OUT", txttriptime.Text)
cmd.ExecuteNonQuery()
MessageBox.Show("Thank you")
Catch ex As Exception
MessageBox.Show("Error to Update:" & ex.Message, "error")
Return
End Try
con.Close()