• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2422
  • Last Modified:

Linking MS Access database to a magnetic stripe card reader

I have developed a simple Time and Attendance database using  MS Access 2007.  It simply provides employees with a unique reference number to use in order to clock  and and out of work.

I have found an IDTech EzWriter (magnetic card reader and writer) in my inherited IT graveyard and have purchased some magnetic cards.  I have downloaded the software for the card reader/writer and have managed to get it to work in terms of reading and writing to the cards.

Does anyone have any advice/suggestions on how easy it would be to link this card reader to the Access database in order to automate the current manual process of clocking in and out of the database?  I am not a developer and at present do not see how I can link the two.  Any direction would be appreciated.
0
DHPBilcare
Asked:
DHPBilcare
  • 2
  • 2
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<Does anyone have any advice/suggestions on how easy it would be to link this card reader to the Access database in order to automate the current manual process of clocking in and out of the database? I am not a developer and at present do not see how I can link the two. Any direction would be appreciated.>>

Unfortunatley, this is not as simple as it could be. That card reader comes with a RS-232 interface. Generally there are three methods that can be used to interface to a card reader or bar code reader:

1. A wedge device - This goes between the keyboard and the computer. Data scanned or read appears as keyboard input - this is the simplest setup as it requires no programming. Any app waiting for keyboard input (a control on an Access form) can receive the data. However this offers the least amount of control (your betting that the user is in the right app and right place)

2. RS232 interface - The data is presented on the com port. You need to either write a program to read the com port and handle the communications or use the MFG's software.

3. MFG's software - Many MFG's will write their software to handle the communications (ie. Time Clock) and will also add in the ability for the software to read/write .CSV files or store data directly in a database, which you can then read/write from another app.

In your case, I'd look at number 3 first. If they don't offer that in the software, then your looking at #2 and doing some development. You may decide however that it would be cheaper to throw away what you have and buy wedge devices.

HTH,
JimD.
0
 
DHPBilcareAuthor Commented:
Thanks for that.

I have a emailed the supplier to see if they offer anything I could use.  After looking at the software available they do not seem to offer anyway of dropping the data into a text file from which I could pick up in another application.  I will also look at the Wedge device option.
0
 
RomoloIT Professional ConsultantCommented:
you need to program and open the comm port. any input then will be entered into a buffer then write the buffer to a text field maybe.

wedge is great bc it does not involve programming at all. however it shares with keyboard  so ,, u must be in correct field when used and if someone types with keyboard this will also input.

open comm is much better bc it runs separately to keyboard

R
0
 
DHPBilcareAuthor Commented:
I would not know where to start in terms of pogramming the comm port, which is why I will more than likely go with the Wedge option.  

Could you provide some sample code so that I can decide if this is something I would do myself?  I will be using Acess 2007.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<Could you provide some sample code so that I can decide if this is something I would do myself?  I will be using Acess 2007.>>

  Using a wedge option?  There is no code really.  Any scan looks the same as keyboard input.  However you might want to do some coding.

  Many scanners/readers do have the ability to prefix, suffix, or both to the data.  So it it possible that you can tell the difference between a scan and keyboard inport.  What you'd do is tell the scanner to send some extra characters before or after (or both) the data.  Then in the BeforeUpdate event of a control, check for those characters.  If they are not present, then the user didn't scan/read the data, but typed it.

  If your talking about what it would take to talk to the com port, most buy a 3rd party control to use.  The control takes care of the low level stuff in talking to the com port and you use the controls interface in your app.  One of the most common is the MSCOMCTL.

Here's a couple of links to using it:

http://www.freevbcode.com/ShowCode.Asp?ID=2236

INFO: Receiving Data Using the MSComm Control's OnComm Event
http://support.microsoft.com/default.aspx?scid=kb;en-us;194922

JimD.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now