How to get data from biometric to VB6?

35 pts.
Visual Basic
Hello guys can anyone help me with my project? Attendance System Face Scanner Biometric connecting to VB6 with zkemkepeer.dll. I have the SDK Demo but I can't really understand it all. I can connect to the device using USB port but my problem is, how to get the time in and out. Every time the user will Log. Thanks in advance.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Depending on what OS you are running, it may not be supported.
VB6 end of life. I would also check with the vendor to see if VB6 is compatible with their hardware.

Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    Is the biometric device has own software? When vendor supplied this one, they must provided software that is front-end and back-end software (like a database). First check the in/out times through this software. Check which database they used (like SQL Server or other for windows users). You have to fetch times from this back-end database. If you use other database other than vendor's database, then you have to migrate the same. Then it is necessary to write a migration program/code for that.
    137,090 pointsBadges:
  • Coder0403
    Thank You for the response Subhendu Sen. Actually they send the Demo but i can't understand everything with the code am using vb6. 
    35 pointsBadges:
  • Coder0403
    Hi Sen,
    I already know some code but my problem is how to get the time every time the user will log?
    This code is getting all data.  
    Pls Help Me.

    Dim dwEnrollNumber As Long
        Dim dwVerifyMode As Long
        Dim dwInOutMode As Long
        Dim timeStr As String
        Dim i As Long
        Dim dwYear, dwMonth, dwDay, dwHour, dwMinute, dwWorkcode, dwReserved As Long
        '2006-4-24 henry modify.
        Dim fso, txtfile
        Dim LogStr As String

        If CZKEM1.ReadGeneralLogData(CInt(txtMachNum.Text)) Then
            i = 1
            Set fso = CreateObject("Scripting.FileSystemObject")
            Set txtfile = fso.CreateTextFile(App.Path + "\MineLog.txt", True)
            CZKEM1.ReadAllUserID 1
            dwInOutMode = dwInOutMode + 1
            While CZKEM1.GetGeneralLogDataStr(CInt(txtMachNum.Text), dwEnrollNumber, dwVerifyMode, dwInOutMode, timeStr)
           '  dwInOutMode = dwInOutMode + 1
              ' While CZKEM1.SSR_GetSuperLogData(CInt(txtMachNum.Text), dwEnrollNumber, dwVerifyMode, dwInOutMode, dwYear, dwMonth, dwDay, dwHour, dwMinute, dwWorkcode, dwReserved)
                    lvX.ListItems.Add i, , dwEnrollNumber
                     ' timeStr = CStr(iYear) + "-" + CStr(iMonth) + "-" + CStr(iDay) + "  " + CStr(iHour) + ":" + CStr(iMinute)
                    With lvX.ListItems(i)
                        .SubItems(1) = IIf(IsNull(dwVerifyMode), "", dwVerifyMode)
                        .SubItems(2) = IIf(IsNull(dwInOutMode), "", dwInOutMode)
                        .SubItems(3) = IIf(IsNull(timeStr), "", timeStr)
                        .SubItems(4) = CStr(dwWorkcode)
                         LogStr = ""
                        LogStr = CStr(dwEnrollNumber) + Chr(9) + CStr(dwInOutMode) + Chr(9) + CStr(dwVerifyMode) + Chr(9) + timeStr + Chr(10)
                       ' LogStr = CStr(dwEnrollNumber) + Chr(9) + CStr(dwVerifyMode) + Chr(9) + CStr(dwInOutMode) + Chr(9) + CStr(dwYear) + "-" + CStr(dwMonth) + "-" + CStr(dwDay) + "  " + CStr(dwHour) + ":" + CStr(dwMinute) + ":" + CStr(dwSecond) + Chr(9) + CStr(dwWorkcode) + Chr(9) + CStr(dwReserved)
                        txtfile.Write (LogStr)
                        txtfile.writeblanklines (1)

                    End With
          If dwEnrollNumber = 888 Then
              Debug.Print dwEnrollNumber, dwInOutMode
              End If
            MsgBox "Get  " & i & " log"
        End If
    35 pointsBadges:
  • Subhendu Sen
    Is there any error shown, when debugging. What back-end is there? Are you using same database, that they used. If yes what is it. Next why are you using vb, while is here and it is more helpful rather than vb.
    137,090 pointsBadges:
  • Coder0403
    I already transfer to VB.NET sen. I can get now the general logs, but in this case I just want to get the data in real time or let say every time the user will log in or log out. Can you help about this?Thanks!

        Private Sub btnGetGeneralLogData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetGeneralLogData.Click
            If bIsConnected = False Then
                MsgBox("Please connect the device first", MsgBoxStyle.Exclamation, "Error")
            End If

            Dim sdwEnrollNumber As String = ""
            Dim idwVerifyMode As Integer
            Dim idwInOutMode As Integer
            Dim idwYear As Integer
            Dim idwMonth As Integer
            Dim idwDay As Integer
            Dim idwHour As Integer
            Dim idwMinute As Integer
            Dim idwSecond As Integer
            Dim idwWorkcode As Integer
            Dim timeStr As String
            Dim idwErrorCode As Integer
            Dim iGLCount = 0
            Dim lvItem As New ListViewItem("Items", 0)
            With lvItem

            End With
            Cursor = Cursors.WaitCursor
            axCZKEM1.EnableDevice(iMachineNumber, False) 'disable the device
            If axCZKEM1.ReadGeneralLogData(iMachineNumber) Then 'read all the attendance records to the memory
                'get records from the memory
                While axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, sdwEnrollNumber, idwVerifyMode, idwInOutMode, idwYear, idwMonth, idwDay, idwHour, idwMinute, idwSecond, idwWorkcode)
                            ' While axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, sdwEnrollNumber, idwVerifyMode, idwInOutMode, timestr, idwWorkcode
                            timeStr = idwYear.ToString() & "-" + idwMonth.ToString() & "-" & idwDay.ToString() & " " & idwHour.ToString() & ":" & idwMinute.ToString() & ":" & idwSecond.ToString()
                    ' If Label8.Text.ToString() < timeStr.ToString() Then
                    iGLCount += 1
                    lvItem = lvLogs.Items.Add(iGLCount.ToString())
                    ' End If
                End While
                Cursor = Cursors.Default
                If idwErrorCode <> 0 Then
                    MsgBox("Reading data from terminal failed,ErrorCode: " & idwErrorCode, MsgBoxStyle.Exclamation, "Error")
                    MsgBox("No data from terminal returns!", MsgBoxStyle.Exclamation, "Error")
                End If
            End If

            axCZKEM1.EnableDevice(iMachineNumber, True) 'enable the device
            Cursor = Cursors.Default
            Timer1.Enabled = False
        End Sub 
35 pointsBadges:
  • jesuscortes
    hola pusite resolver tu problemaa¡¿'¿'¿

    10 pointsBadges:
  • Forgot Password

    No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

    Your password has been sent to:

    To follow this tag...

    There was an error processing your information. Please try again later.

    Thanks! We'll email you when relevant content is added and updated.


    Share this item with your network: