Mehram
asked on
Swap card machine
I want to design attendance application with help of Swap card machine through USB Port. But the confusion is that how the data will be entering into MYSQL for out or in time. My employee code is base on 4 digits.
I am using VB 6 as front end and MYSQL as backend and I would request you to please guide how data can enter into database through swap machine.
I am using VB 6 as front end and MYSQL as backend and I would request you to please guide how data can enter into database through swap machine.
you can use text file when you do all the transaction in file outside the visual basic then you can import it to your application
you need to use Status Flag to check the in out for each employee
you need to use Status Flag to check the in out for each employee
I just spotted an error in my pseudocode back there. it should read:
if( ID in statustable)
if( status = in )
set status = out
log change in activity table
else
set status = in
log change in activity table
else
add ID to statustable with status = in
log change in activity table
if( ID in statustable)
if( status = in )
set status = out
log change in activity table
else
set status = in
log change in activity table
else
add ID to statustable with status = in
log change in activity table
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you I am checking and reverting back.
2 tables, an activity log, and a status table. When someone swipes the card, I assume your card reader gives you some unique ID cooresponding to that card.
if( ID in statustable)
if( status = in )
set status = out
log change in activity table
else
set status = out
log change in activity table
else
add ID to statustable with status = in
log change in activity table
The status table will map ID->status
The log table will map ID->status changes (out->in/in->out) if you so desire to keep this information.