Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to know like how can i retrieve the FMD as based on the doumentation provided by digitalPersona, FMD will be used to save to database. Based on the code given, FMD stated successfully created but it will not be stored. In the documentation also stated that the FMD stored temporarily in memory, once exit the program it will be removed. So, i decided to use that FMD to store permanently, therefore i need to know how can i retrieve it.

C#
private void OnCaptured(CaptureResult captureResult)
        {
            try
            {
                // Check capture quality and throw an error if bad.
                if (!_sender.CheckCaptureResult(captureResult)) return;

                count++;

                DataResult<Fmd> resultConversion = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Constants.Formats.Fmd.ANSI);
   
                SendMessage(Action.SendMessage, "A finger was captured.  \r\nCount:  " + (count));

                if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS)
                {
                    _sender.Reset = true;
                    throw new Exception(resultConversion.ResultCode.ToString());
                }

                preenrollmentFmds.Add(resultConversion.Data);

                if (count >= 4)
                {
                    DataResult<Fmd> resultEnrollment = DPUruNet.Enrollment.CreateEnrollmentFmd(Constants.Formats.Fmd.ANSI, preenrollmentFmds);

                    if (resultEnrollment.ResultCode == Constants.ResultCode.DP_SUCCESS)
                    {
                        SendMessage(Action.SendMessage, "An enrollment FMD was successfully created.");
                        SendMessage(Action.SendMessage, "Place a finger on the reader.");
                        preenrollmentFmds.Clear();
                        count = 0;
                        return;
                    }
                    else if (resultEnrollment.ResultCode == Constants.ResultCode.DP_ENROLLMENT_INVALID_SET)
                    {
                        SendMessage(Action.SendMessage, "Enrollment was unsuccessful.  Please try again.");
                        SendMessage(Action.SendMessage, "Place a finger on the reader.");
                        preenrollmentFmds.Clear();
                        count = 0;
                        return;
                    }
                }

                SendMessage(Action.SendMessage, "Now place the same finger on the reader.");
            }
            catch (Exception ex)
            {
                // Send error message, then close form
                SendMessage(Action.SendMessage, "Error:  " + ex.Message);                
            }  
        }


What I have tried:

I found the sdk provided by digital persona and read their document given to me, and i have go through it but still i have no idea.
Posted
Updated 11-Dec-22 17:16pm
v2
Comments
Richard MacCutchan 5-Feb-16 4:14am    
Sorry, but unless you ask a proper question it is unlikely that anyone can help you. And if you cannot understand the documentation that comes with the device then it is even less likely that we can help you.
Nareen Nair 5-Feb-16 6:37am    
thanks for the reply.the problem i face is i am not sure in how to extract the FMD as in order to save to a database extraction of FMD is crucial. What this code does is only create FMD but stores is temporary. The moment i exit the program it will remove the temporary stored FMD
Richard MacCutchan 5-Feb-16 6:40am    
Then you need to do something with the data before you exit your program. This is really fairly basic programming: you access some input device to read the input data, capture it in an array or object, write it to permanent storage.

Please edit your question and explain exactly what the problem is, we cannot see your screen or guess what you are doing. And while you are there please add <pre> tags around your code and remove all the pieces that are not connected with the problem.
Nareen Nair 5-Feb-16 8:44am    
thanks sir, and thanks alot for replying and helping.. sir this the asjustment i made to the question. The OnCapture method above used to capture fingerpritn from the reader and convert to FMD
Richard MacCutchan 5-Feb-16 12:00pm    
What exactly have you captured? Is this text, a binary arry ... ? Whatever it is you need a corresponding field in your database in order to save it.

1 solution

What you need is to xmlserialized the result enrollment fmd and store it in db which will be deserialized when you retrieved it but consider security issue hash the data or even add with salting

Fmd.serializedXml(fmd);
During retrieval
Fmd.DeserializedXml(fmd);
 
Share this answer
 
Comments
Dave Kreskowiak 12-Dec-22 0:16am    
I seriously doubt the OP is still working on the problem six years later.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900