I can match fingerprints by using sql query "where id". But i want is to identify all fingerprints on the database.
I use zk4500 fingerprint scanner. Mysql c#. sorry for my english and explanation im just a newbie..
if (bIdentify)
{
if (userid.Text == string.Empty)
{
return;
}
// int ret = zkfp.ZKFP_ERR_OK;
int fid = 0, score = 0;
mysqlConn.Open();
MySqlCommand cmd1 = mysqlConn.CreateCommand();
cmd1.CommandText = (@"select * from emp_fingerprint where emp_id=?emp_id");
//cmd1.Parameters.AddWithValue("?fingerprint_1", dbfp);
cmd1.Parameters.AddWithValue("?emp_id", userid.Text);
MySqlDataAdapter da = new MySqlDataAdapter(cmd1);
DataTable dt = new DataTable();
da.Fill(dt);
dr = cmd1.ExecuteReader();
while (dr.Read())
{
byte[] dbfp = new byte[2048];
dbfp = (byte[])(dr["fingerprint_1"]);
string a = dr["emp_id"].ToString();
dr.Close();
mysqlConn.Close();
int match = zkfp2.DBMatch(mDBHandle, CapTmp, dbfp);
if (match > 0)
{
textBox1.Text = "Identify success, percent= " + match + "%";
break;
}
else
{
textBox1.Text = "Identify fail, percent= " + match + "%";
return;
}
}
}
My main problem is i dont know how to store the bytes returned from the finger print scanner in the database and then query those bytes to get the user they belong too