Section 2. methods, Clearbuffer, Findelement – MagTek MTBLUETOOTH.OCX User Manual

Page 13

Advertising
background image

9

SECTION 2. METHODS

CLEARBUFFER
Clears the CardData property.

Syntax

CtlMTBluetooth1.ClearBuffer()

The ClearBuffer method syntax has no parameters.

FINDELEMENT
Returns particular information after parsing out specific card data based on parameters selected
by the user.

Syntax
CtlMTBluetooth1.FindElement(ByVal

TrackNum As Integer, ByVal

RefChar As String, ByVal

Displacement As Integer, ByVal NumDigits As String, [DirectionBack As Variant]) As String

The FindElement method syntax has these parts:

Part

Description

TrackNum

See Values From GetTrack method.

RefChar

The Character to Reference - Can also include multiples (e.g.,
^^ would indicate Reference Character is the second ^).

Displacement

Number of Digits to Displace.

NumDigits

The Length or Terminating Character - Can also include
multiples (e.g. “= = =” would indicate that the Terminating
Character is the third “=”).

DirectionBack

The Direction to Travel. This parameter is optional. If set to
True, the OCX looks Right to Left; if set to False, the OCX
looks Left to Right. If not specified, the OCX looks Left to
Right unless the RefChar specified is an End Sentinel on
Magnetic Track Data ("?"), in which case the OCX looks Right
to Left.

Example
Assume the Data from a Card Returned:
"%B1234567890123456^CARD/TEST^9912101?;1234567890123456=9912101?"

CtlMTBluetooth1.FindElement(2,”;”,0,”=”) will return ‘1234567890123456’

CtlMTBluetooth1.FindElement(2,”;”,0,”16”) will return ‘1234567890123456’

CtlMTBluetooth1.FindElement(1,”^”,0,”^^”) will return ‘CARD/TEST’

CtlMTBluetooth1.FindElement(1,”^”,0,”/”) will return ‘CARD’

Data Type

String


Advertising