good day to all I just need some help. I was wondering if my code is correct so please guide if it is not. I have a Digital Personal Biometric Model U.ar.U 4500 using DPFP .NET (C#) SDK I was able to save the serialize template to Database ms-sql and I was wondering if the way a serialize is correct. If it is correct how do I deserialize and compare the data to the machine template. here is my code.
public void EnrollmentControl_OnEnroll(Object Control, int Finger, DPFP.Template
Template, ref DPFP.Gui.EventHandlerStatus Status) {
if (Data.IsEventHandlerSucceeds) {
byte[] by = new byte[0];
foreach (DPFP.Template template in Data.Templates)
{
if (template != null)
{
by = new byte[template.Bytes.Length];
template.Serialize(ref by);
string PP;
string CR;
PP = iSQL.STORED_PROCEDURE_FNG_IMG; // <- Stored Procedure INSERT INTO Employee_Img
CR = "AB-0001-R12";
iEmp emp = new iEmp(PP); // <- Class that insert to MS SQL
int rt = emp.Insert_Finger(CR, template.Bytes); // <- return 1 if Successfully
if (rt == 1) { iCon.success_mgs(1, "Successfully Inserted", iSQL.EMPLOYEE_REGISTRN); } //<- Popup message
else { iCon.success_mgs(1, "Successfully Inserted", iSQL.EMPLOYEE_REGISTRN); }
}
}
Data.Templates[Finger - 1] = Template; // store a finger template
ExchangeData(true); // update other data
ListEvents.Items.Insert(0, String.Format("OnEnroll: finger {0}", Finger));
}else
Status = DPFP.Gui.EventHandlerStatus.Failure; // force a "failure" status
}
I have faced with this problem, then I have fixed it already by following steps:
Example: pgAdmin:
Table Name:
-tbl_fptable
DB Fields:
fp_id (int) fp_data (text)
Insert Data to Database;
Get Data from Database to verified
I hope this example can solve this stuck.