Hi Guys
How r u all?
i have a code that must start a verification form when load a finger print to recognize it but it is not working
Imports System.Data.OleDb
'Delegate Sub FunctionCall(ByVal param)
Public Class IdentifyByFeatures
Private Template As DPFP.Template
Private Sub VerifyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VerifyButton.Click
Dim Con As New OleDbConnection()
Dim cmd As New OleDbCommand()
Dim str As String
Dim dr As OleDbDataReader
lblStatus.Visible = False
If T_Gender.Text <> "" Then
Con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\fingerprint2011\CivilRecords.mdb"
Con.Open()
str = "Select * from CivilRecords where gender='" & T_Gender.Text & "'"
If Chk_First.Checked Then str = str & " and [first name]='" & T_First.Text & "'"
If Chk_Tel.Checked Then str = str & " and tel='" & T_Tel.Text & "'"
If Chk_Nationality.Checked Then str = str & " and nationality='" & T_Nationality.Text & "'"
cmd = New OleDbCommand(str, Con)
dr = cmd.ExecuteReader
lblStatus.Visible = True
lblStatus.Text = "Records found."
' Dim i As Integer
VerifiedStatus = False
Do While dr.Read()
' i += 1
CivilIDFileName = dr("CivilID")
Using fs As IO.FileStream = IO.File.OpenRead("C:\FingerPrint2011\fps\" & CivilIDFileName)
Dim template As New DPFP.Template(fs)
OnTemplate(template)
End Using
Dim Verifier As New VerificationForm()
Verifier.Verify(Template) ' VerificationForm.Show()
If VerifiedStatus = True Then Exit Do
Loop
If VerifiedStatus = True Then
MsgBox("Civil ID=" & CivilIDFileName & " and the first name is: " & dr.Item("First Name"))
End If
Else
MsgBox("Please enter gender first.")
End If
End Sub
Private Sub OnTemplate(ByVal template)
Invoke(New FunctionCall(AddressOf _OnTemplate), template)
End Sub
Private Sub _OnTemplate(ByVal template)
Me.Template = template
VerifyButton.Enabled = (Not template Is Nothing)
' SaveButton.Enabled = (Not template Is Nothing)
If Not template Is Nothing Then
MessageBox.Show("The fingerprint template is ready for fingerprint verification.", "Fingerprint Enrollment")
Else
MessageBox.Show("The fingerprint template is not valid. Repeat fingerprint enrollment.", "Fingerprint Enrollment")
End If
End Sub
End Class
Help me PLEAZE