Re: reading from a card reader

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi JP,
Thanks for your help :) .............now I can do exactly what i wanted.

Thx again

"JP Bless" wrote:

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: reading from a card reader
    ... input box will only work for single track magnetic card readers... ... card reader is single track reader. ... Private Sub UpdateTemp2 ... Dim iCounter As Integer ...
    (microsoft.public.vb.general.discussion)
  • Re: Q: Strange Copying Error
    ... USB card reader takes 5v power from the USB port. ... I suspect that the faster CF cards in card readers draw more current than slower cards when reading - enough so that there's enough voltage drop that the reader won't work properly. ... Try connecting card reader to closest USB port to the motherboard - probably the back connectors on the system unit. ...
    (rec.photo.digital.slr-systems)
  • Re: Damned right its your card reader, Mr. Jones!
    ... month regarding the pokiness of my CF card reader ("Is it my card ... a shot on a SanDisk Extreme USB 2.0 reader. ... It totally trashed the generic card reader I've been using for the ... Many card readers claim USB 2.0, but they do not get anywhere near USB ...
    (rec.photo.digital)
  • Re: Damned right its your card reader, Mr. Jones!
    ... month regarding the pokiness of my CF card reader ("Is it my card ... a shot on a SanDisk Extreme USB 2.0 reader. ... It totally trashed the generic card reader I've been using for the ... Many card readers claim USB 2.0, but they do not get anywhere near USB ...
    (rec.photo.digital)
  • Re: Bugs on aspire one A150
    ... that now the SD only card reader is always enabled ... please include acpiphp fix in 2.6.28. ... ejectable slot detection code a little in order to flag these slots as ...
    (Linux-Kernel)