+ 5
Is there anyone knows the code for time in and time out in Visual Basic please let me know
18 Réponses
+ 6
Will Google help?
+ 1
But what you mean by time in and time out?
+ 1
Its like monitoring system when the ID tap the scanner it will appear the time in and time out in the database in Visual basic
+ 1
Try
dr.Close()
Dim ups As New MySqlCommand("UPDATE " & Table_Name4 & "SET TimeOut=curtime() WHERE StudID='" & LabelStudID.Text.Substring(5, LabelStudID.Text.Length - 5) & "'", Conn)
ups.ExecuteNonQuery()
TimeOutLog.Text = "TIME OUT : " & Now.ToString
Catch ex As Exception
End Try
+ 1
Theres a logical error there
+ 1
Varchar
+ 1
Because the system is RFID Base
+ 1
There is no error message sir
+ 1
Maybe the placing of the columns
+ 1
Or maybe it cant find the column to select for update
+ 1
Okay thankyou sir that was very helpful 😊
+ 1
Jane Cruz it looks like the query needs a space inserted before "SET...", unless Table_Name4 already has a space appended at its end.
Side note: I noticed that it is recording potentially two different timestamps between the database record and the log file. The query takes its timestamp from the SQL engine, and the log file timestamp comes from the local computer. If the SQL engine is on a separate server (and worse, in a different time zone) the timestamps will surely be different. This makes log analysis difficult to reconcile with database timestamps. You should use a consistent time source and be certain the log matches the database times exactly by retrieving the time once and using the same result in both places. Alternatively, you could retrieve the timestamp from the record after the update and use that timestamp in the log file.
0
By anychance do u know the code for that? Can u help me sir
0
Not sure what logical problem is
Maybe you can build the query as a string and show it in a MessageBox for a closer observation (for SQL syntax error).
What are the data type for 'Timeout', and 'StudID' column?
0
Tell me more about your suspicion for logical error ...
What got you thinking it is happening? any error message?
Check validity and correctness for quotes in the query may (or not) help.
0
Placement of columns matters for INSERT not UPDATE.
Your query will fail with error if you try to update a non existing column
So strike those two cause you said there was no error message.
0
Keep me posted for updates ...
- 1
Hiii