Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends
I am developing software for payroll which includes fingerprint images
I have captured the image successfully but when I try to verify the image, verification fails if we have more then one record in DB but it works with one record.
Kindly help us with this.
Thanks and regards
Kannan.

What I have tried:

VB
Private Sub btn_Verify_Click_1(sender As System.Object, e As System.EventArgs) Handles btn_Verify.Click


        SetInitValue(pbVerify.Handle.ToInt32())
        Dim m_FIR As NBioAPI.Type.HFIR
        Dim m1_textFIR As NBioAPI.Type.FIR_TEXTENCODE
        Dim ret As UInteger = m_BioAPI.Capture(m_FIR, NBioAPI.Type.TIMEOUT.[DEFAULT], m_WinOption)
        If ret = BioAPI.[Error].NONE Then

            m_BioAPI.GetTextFIRFromHandle(m_FIR, m1_textFIR, True)
            labelMessage.Text = "Capture Successfull !!"
            Try
                Dim cmd As New OleDbCommand("Select * from FingerPrintData")
                cmd.Connection = myconnection
                Dim reader As OleDbDataReader = cmd.ExecuteReader()
                Dim userID As String = ""
                Dim fpdata As String = ""
                Dim name As String = ""
                While reader.Read()
                    userID = reader.GetString(1).ToString()
                    fpdata = reader.GetString(3).ToString()
                    name = reader.GetString(2).ToString()

                End While
                Dim textFIR As New NBioAPI.Type.FIR_TEXTENCODE()
                textFIR.TextFIR = Fpdata
                Dim result As Boolean

                Dim payload As New NBioAPI.Type.FIR_PAYLOAD()
                m_BioAPI.VerifyMatch(textFIR, m1_textFIR, result, payload)
                If result Then

                    MessageBox.Show(name + txtuserverify.Text + " Verified successfully !!")
                Else
                    MessageBox.Show("Verification Failed !!! Try Again ")
                End If
                pbVerify.Image = Nothing

                cmd.Dispose()


            Catch ex As Exception
                labelMessage.Text = "Database Exceptiom occured.."
            End Try
        Else
            MessageBox.Show("Capture process Failed !!!")
        End If
    End Sub
Posted
Updated 22-May-19 2:19am
v2
Comments
Richard MacCutchan 22-May-19 4:00am    
If verification is failing then you need to investigate why. Check the documentation for the API that you are using.

1 solution

You have no "selection criteria" in your "query" (the SQL "SELECT").

You're simply retrieving the "last" db record each time (after skipping the others).

No userid or name match ... just "let's see if the last record matches".
 
Share this answer
 
v2
Comments
Member 10331676 24-May-19 0:19am    
Thank you so much for your reply. last record matches are working fine...
I understand the issue, where clause is missing in select query, how to add fpdata (fingerprint image) in where clause.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900