I searched and tried some codes to save the enrolled fingerprints from the scanner but my error was "id and FP couldn't be null". I know that there is something wrong with the codes i used. I am using OTW SDK of Digital Persona. VB.net as prog.language and MySql as my database. Thank you for helping me solved this problem.
Private Sub btnsave_Click(sender As Object, e As EventArgs) Handles btnsave.Click
Dim conn As MySqlConnection
conn = New MySqlConnection
conn.ConnectionString = ("Server = localhost; User Id= root; Password =1234;Database = dbpayroll")
Dim cmd As MySqlCommand
Try
conn.Open()
For Each template As DPFP.Template In Data.Templates
If Not template Is Nothing Then
cmd = New MySqlCommand("INSERT INTO employeefp " +
"SET id=@id, " +
"FP=@FP " +
" ", conn)
cmd.Parameters.Add(New MySqlParameter("@id", Me.TextBox1.Text))
cmd.Parameters.Add(New MySqlParameter("@FP", template.Bytes))
cmd.ExecuteNonQuery()
MessageBox.Show("Template Successfuly Saved.", "Finger Enrolled")
End If
Next
conn.Close()
Catch myerror As MySqlException
MessageBox.Show(myerror.Message)
End Try
End Sub