Re: reading from a card reader



No, input box will only work for single track magnetic card readers... That
is the card being read contains all the data as single line and the magnitic
card reader is single track reader. If you use inputbox for multi-track
readers then the card reader will read the first track into inputbox and
then chr(13) "event" will cause the reader to dump data stored in subsequent
tracks into next control/texbox in tab order.

Design your "inputbox" which basically is create a separate form, with a
textbox and set the textbox's multiline property to true. You can return the
entire tracks read by magstripe to "global variable" temp2. From there
decoding is question of separating the data into tracks using separator
sentinels.

Private Sub UpdateTemp2
frmX.Show 1
End Sub

Why don't you post the code you are using now... I mean the part where you
are using InputBox.



"Abby" <Abby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:29252A70-56F0-46F4-8F51-E918835002D0@xxxxxxxxxxxxxxxx
hi JP,
i am using a inputbox function as
temp2 = InputBox("Please swipe the card now", "card reader")
where temp2 is a string

Now my question is shouldn't the temp2 string contain the data on all the
3
tracks
separated by chr(13) when i swipe the card?

Because when i see the value in temp2 only the track1 data is there and
then
track2 data goes in the textbox i have the focus set on.

Is there a way to work around this?

thanks
"JP Bless" wrote:

Dim iTracks As Integer
Dim iCounter As Integer
'iTrack value must set to the number of tracks
'input magnetic stripe has
'Also default iCounter to 1
'Also ensure TextBox1 multiline property is set

Private Sub Form_Load()
iCount = 1
iTracks = 2 'Default to 1 track magstripe
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
On Error GoTo Err_KP
Select Case KeyCode
Case 13 'ENTER key...
'If magnetic card reader is one track..
If iTracks = 1 Then
'Put code here to decode/read input from magnetic reader
DoEvents
Unload Me
Exit Sub
End If
'If card reader is more than 1 track
If iCounter < iTracks Then
'iterate all tracks until all tracks are read
iCounter = iCounter + 1
Exit Sub
Else
'Put code here to decode/read input from magnetic reader
'Be aware that if more than 1 track is read
'Use start and stop sentinals (special separator
characters)
'to determine tracks relevant characters
iCounter = 1
DoEvents
End If
End Select
Exit Sub
Err_KP:
Exit Sub
End Sub
















"Abby" <Abby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:000AB258-1D63-46E8-9D5F-7743B01E5E4F@xxxxxxxxxxxxxxxx
Hi all,

I have an application in which I am trying to read the data stored
from a
magnetic card reader. I was using the inputbox function but am able to
read
only the 1st Track of data. i also need to read the data in the second
track.

Any help would be appreciated.

Thanks in advance.








.



Relevant Pages

  • Re: SCardTransmit Fails
    ... ' Advanced Card Systems, Ltd for the Smart Card Development Kit sample code. ... ' this reader be ignored. ... ' This implies that the given ... End Sub ...
    (microsoft.public.platformsdk.security)
  • Re: SCardTransmit Fails(Forgot to Attach File)
    ... ' Advanced Card Systems, Ltd for the Smart Card Development Kit sample code. ... ' this reader be ignored. ... ' This implies that the given ... End Sub ...
    (microsoft.public.platformsdk.security)
  • Re: RFID Flap Silences Security Researchers
    ... while - now it's down to credit card size. ... through a reader, just passed near it. ... RFID devices as people pass by. ...
    (comp.home.automation)
  • Re: External firewire CF card reader not recognised
    ... See if you can find any firmware updates for the card ... | After rebooting OS would recognise card reader as a type II CF reader, | however there was yellow exclamation mark next to it, after few seconds | ""SBP2 Compliant ... | I forgot to mention my machine has two firewire ports, one on the | motherboard the other with Audigy Platinum. ... | Weird thing both ports are listed in Dev Manager as OHCI Compliant IEEE 1394 | Host Controller with Microsoft drivers loaded. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Whats a "programming language"
    ... You may recall I also offered a photograph with my previous post. ... I wrote a program to the hardware I/O interface for the card ... to mix the line and reader or line and printer tasks. ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)