Is there anyone knows the code for time in and time out in Visual Basic please let me know | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 5

Is there anyone knows the code for time in and time out in Visual Basic please let me know

15th Dec 2020, 3:08 PM
Jane Cruz
Jane Cruz - avatar
18 Antworten
+ 6
Will Google help?
15th Dec 2020, 10:11 PM
Sonic
Sonic - avatar
+ 1
But what you mean by time in and time out?
15th Dec 2020, 3:23 PM
Ipang
+ 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
15th Dec 2020, 3:33 PM
Jane Cruz
Jane Cruz - avatar
+ 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
15th Dec 2020, 3:35 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Theres a logical error there
15th Dec 2020, 3:36 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Varchar
15th Dec 2020, 3:51 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Because the system is RFID Base
15th Dec 2020, 3:52 PM
Jane Cruz
Jane Cruz - avatar
+ 1
There is no error message sir
15th Dec 2020, 3:59 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Maybe the placing of the columns
15th Dec 2020, 4:00 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Or maybe it cant find the column to select for update
15th Dec 2020, 4:00 PM
Jane Cruz
Jane Cruz - avatar
+ 1
Okay thankyou sir that was very helpful 😊
15th Dec 2020, 4:06 PM
Jane Cruz
Jane Cruz - avatar
+ 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.
17th Dec 2020, 2:48 PM
Brian
Brian - avatar
0
By anychance do u know the code for that? Can u help me sir
15th Dec 2020, 3:33 PM
Jane Cruz
Jane Cruz - avatar
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?
15th Dec 2020, 3:48 PM
Ipang
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.
15th Dec 2020, 3:56 PM
Ipang
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.
15th Dec 2020, 4:04 PM
Ipang
0
Keep me posted for updates ...
15th Dec 2020, 4:20 PM
Ipang
- 1
Hiii
17th Dec 2020, 1:16 PM
Friends Creations
Friends Creations - avatar