Part of my works

‘READER MPT1
devModel = “AC800+”
devNo = “1”
ipAdd = “192.168.1.202”
portNo = “4370”
comm = “0”
commPort = “0”
baudRate = “115200”
reader = “1”

lvX.ColumnHeaders.Add 1, , “Enroll Number”, 500
lvX.ColumnHeaders.Add 2, , “verif ymode”, 1000
lvX.ColumnHeaders.Add 3, , “in out”, 1000
lvX.ColumnHeaders.Add 4, , “timestr”, 3000

CZKEM1.BASE64 = 1
bconn = False
CZKEM1.GetSDKVersion SDKVersion
labSDK.Caption = “SDKVersion:” + SDKVersion

If portNo = “” Then Exit Sub
bconn = CZKEM1.Connect_Net(CStr(ipAdd), CLng(portNo))
If bconn = True Then

StatusBar1.Panels(1).Text = “connect successful”

CZKEM1.Beep 150
Else
StatusBar1.Panels(1).Text = “connect fail”
Write #fn, “============================================================================ ”
Write #fn, “Date : ” + date_current + ” Time : ” + time_current
Write #fn, “Id Date Time WorkCode Reader IpAdress”
End If

If CZKEM1.ReadGeneralLogData(CInt(devNo)) Then
i = i + 1
Do While CZKEM1.GetGeneralLogDataStr(CInt(devNo), dwEnrollNumber, dwVerifyMode, dwInOutDate, timeStr)
lvX.ListItems.Add i, , dwEnrollNumber
With lvX.ListItems(i)
.SubItems(1) = IIf(IsNull(dwVerifyMode), “”, dwVerifyMode)
.SubItems(2) = IIf(IsNull(dwInOutDate), “”, dwInOutDate)
.SubItems(3) = IIf(IsNull(timeStr), “”, timeStr)

End With
i = i + 1
Debug.Print i
time = timeStr

id = (dwEnrollNumber)

If id 10 And id 100 And id 1000 And id 10000 And id 40000 And time_tmp 40000 And time_tmp 150000 And time_tmp 64500 And time_tmp < 83000)) Then
code = 1
Else
End If

Write #fn, (id_tmp) + ” ” & (timeStr) & ” ” & (code) & ” ” & (reader) & ” ” & ipAdd
oConn.Execute “insert into ea_attendancetxn (eaax_locid,eaax_termid,eaax_txndatetime,eaax_txnflag,eaax_staffid,eaax_mfgno,eaax_mykadflag) values (2,1,'” & time & “‘,'” & code & “‘, ‘” & id & “‘ ,'” & id & “‘ ,Null);”
Loop

Else
End If

Advertisements

2 responses to “Part of my works

  1. is the code complete?
    im doing the same project but have difficulties in understanding the code. i have problem in establishing the connection to the reader, can u guide me?

  2. hello, i am program a software with ZK, and i have come questions, maybe, can you help me?, because i dont known how can i to conected multiple biometrics at the same time? do u known?.

    thanks for ur help. my email patriciaperalta@drsecurity.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s