I have saved the dpfp template in a varbinary(max)
column, now I am retrieving it from database, converting to byte[]
, then deserializing it, and then putting in the verify() method, but an error occurs:
Exception from HRESULT: 0xFFFFFFF8
How I am getting the data is shown here:
SqlConnection cn = new SqlConnection(@"Data Source=Windows\me;Initial Catalog=Enroll;Persist Security Info=True;User ID=sa ; Password=sa123");
cn.Open();
SqlDataAdapter adp = new SqlDataAdapter("Select varb from employee where employeeid='127'", cn);
DataTable dt = new DataTable();
adp.Fill(dt);
bytes= ConvertDataSetToByteArray(dt);
Template = new DPFP.Template();
Template.DeSerialize(bytes);
<b>Verificator.Verify(features, Template, ref result);</b>
UpdateStatus(result.FARAchieved);
if (result.Verified)
MakeReport("The fingerprint was VERIFIED.");
else
MakeReport("The fingerprint was NOT VERIFIED.");
This Verify()
is not verifying the data coming from DB.
Where is my mistake? In the conversion? Or in not getting data properly?
ConvertDataSetToByteArray() method should be excluded
System.Byte
in datable will be convert in to byte[]
by:
foreach (DataRow row in dt.Rows)
{
bytes = (byte[])row["varb"];
}