Click here to Skip to main content
15,888,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ive seen all the post related to my problem.. but i have different code .. i've searching for the answer for almost 2weeks now .. but no luck .. this is my code i dont know what's happening .. it keeps prompting Verification Failure .. i dont know whats the problem in my code .. the bolded line's where i guess the problem occurs .. can someone kindly help me to fix this :( im using vb.net 2010 as my front and MySql as my back-end.. im using DigitalPersona 4000B

VB
Sub OnComplete(ByVal Control As Object, ByVal FeatureSet As DPFP.FeatureSet, ByRef EventHandlerStatus As DPFP.Gui.EventHandlerStatus) Handles VerificationControl.OnComplete

       Dim con As New MySqlConnection("Server = localhost; Username= root; Password =; Database = fesdata")
       Dim cmd As New MySqlCommand("SELECT * FROM empdata", con)
       con.Open()
       Dim fpreader As MySqlDataReader = cmd.ExecuteReader


       Dim byteTemplate As Byte()
       Dim memStreamTemplate As MemoryStream

       Dim ver As New DPFP.Verification.Verification()
       Dim res As New DPFP.Verification.Verification.Result()

       If fpreader.HasRows Then
           While fpreader.Read

               byteTemplate = fpreader.Item("Fingerprint")
               memStreamTemplate = New MemoryStream(byteTemplate)
               Dim templa8 As DPFP.Template = New DPFP.Template()
               templa8.DeSerialize(memStreamTemplate)

               If Not FeatureSet Is Nothing Then

                   ver.Verify(FeatureSet, templa8, res)
                   If res.Verified Then
                       Call SEARCH_EMPLOYEE()
                   End If
               End If
           End While
       Else
           MsgBox("Unknown Employee!")
       End If
       fpreader.Close()


   End Sub
Posted
Comments
Nirav Prabtani 21-Dec-13 6:43am    
what is error message??????
&
what is status of res????
ejc67 28-Dec-14 11:47am    
I'm looking at saving the fingerprint to MSSQL and being able to verify against MSSQL - I'm using VS2010 as well just like you - were you able to get this working?

try this method...:)


VB
Dim idResult As DPUruNet.IdentifyResult = DPUruNet.Comparison.Identify("Finger FMD1", 0,"List of finger FMD from Database", 2147, 2)
            If (idResult.ResultCode = DPUruNet.Constants.ResultCode.DP_SUCCESS) Then
                If (idResult.Indexes.Length >= 1) Then  'Found potential match, dont search second collection (speed optimized)
                    userId = "Data from database"
                Else
                    userId = 0
                End If
            Else


if you will get index length > 1 then your finger has been verified.. :)
 
Share this answer
 
v2
Comments
Member 10480399 21-Dec-13 7:09am    
-nirav , the error is Verification Failure .. i dont know exactly what's happening .. is that solution is compatible with my code?
Nirav Prabtani 21-Dec-13 7:11am    
have you installed SDK for that??? and have you got FMD for varification???
Member 10480399 21-Dec-13 7:15am    
yes i already installed the SDK ... but that SDK is not connected to a database .. i search for some codes for and i come up with this .. but unfortunately .. when i need to verify and compare the templates that was saved in database the error occurs.. can you please tell me what's wrong with my code?
Nirav Prabtani 21-Dec-13 7:17am    
fave you got FMD as a hex string?????? after scanning finger ???
Member 10480399 21-Dec-13 7:21am    
excuse me .. but whats FMD?
mstream as new IO.MemoryStream
Dim templa8 as DPFP.Temple = new DPFP.Template
templa8.Serialize(mstream)
Dim serializedTemplate as Byte() = mstream.ToArray
 
Share this answer
 
Comments
Member 10480399 21-Dec-13 7:58am    
this is the code i search and currently using ..

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