for me and with ms access 2016
save to DB in ole field
Imports System.IO
Imports System.Text
Imports System.Drawing
Imports SecuGen.FDxSDKPro.Windows
Imports System.Data.OleDb
Dim conn As New OleDbConnection("provider=microsoft.ace.oledb.12.0; data source=C:\Users\ALi\Desktop\Test.accdb")
<pre> Dim fp_image() As Byte
m_FPM.SetTemplateFormat(SGFPMTemplateFormat.ISO19794)
ReDim fp_image(m_ImageWidth * m_ImageHeight)
m_FPM.GetImage(fp_image)
DrawImage(fp_image, PictureBox2)
m_FPM.CreateTemplate(fp_image, m_RegMin1)
m_FPM.GetImageQuality(m_ImageWidth, m_ImageHeight, fp_image, img_qlty)
m_FPM.GetImageQuality(m_ImageWidth, m_ImageHeight, fp_image, img_qlty)
If (img_qlty < 74) Then
MsgBox("جودة الصورة قليلة " & img_qlty.ToString)
Return
End If
Dim cmd As New OleDbCommand
conn.Open()
cmd.Connection = conn
cmd.CommandType = CommandType.Text
cmd.CommandText = "INSERT INTO `tbl1` (Fname, Lname, job, Fprint) VALUES (@Fname, @Lname, @job, @Fprint)"
cmd.Parameters.AddWithValue("@Fname", TextBox1.Text)
cmd.Parameters.AddWithValue("@Lname", TextBox2.Text)
cmd.Parameters.AddWithValue("@job", CInt(TextBox3.Text))
cmd.Parameters.AddWithValue("@Fprint", m_RegMin1)
cmd.ExecuteNonQuery()
conn.Close()
MsgBox("تم الحفظ")
'==================================
'to match from DB
Dim match_score As Int32
match_score = 0
Dim fp_image() As Byte
Dim matched As Boolean = False
Dim secu_level As SGFPMSecurityLevel = SGFPMSecurityLevel.NORMAL
ReDim fp_image(m_ImageWidth * m_ImageHeight)
m_FPM.SetTemplateFormat(SGFPMTemplateFormat.ISO19794)
m_FPM.GetImage(fp_image)
DrawImage(fp_image, PictureBox3)
m_FPM.CreateTemplate(fp_image, m_RegMin2)
Dim cmd As New OleDbCommand
Dim da As New OleDbDataAdapter(" select * from tbl1", conn)
Dim dt As New DataTable
da.Fill(dt)
For i = 0 To dt.Rows.Count - 1
m_FPM.MatchTemplate(dt(i)(5), m_RegMin2, secu_level, matched)
match_score = 0
m_FPM.GetMatchingScore(dt(i)(5), m_RegMin2, match_score)
'in my case fingerprint in field 5
If (matched) Then
Label2.Text = "البصمة مطابقة "
statusbar.Text = match_score
TextBox1.Text = dt(i)(1).ToString
TextBox2.Text = dt(i)(2).ToString
Exit For
End If
Next
If Not (matched) Then
Label2.Text = "البصمة غير مطابقة!"
'Else
'Me.Text = "MatchTemplate() Error : " + Convert.ToString(iError)
TextBox1.Text = ""
TextBox2.Text = ""
End If