DigitalPersona to Griaule(GrFingerX) or Vice VersaHow can I convert a Unix timestamp to DateTime and vice versa?How do you convert a byte array to a hexadecimal string, and vice versa?Converting XDocument to XmlDocument and vice versaMapping object to dictionary and vice versaConvert UIImage to NSString (and vice-versa)Converting BitmapImage to Bitmap and vice versaDigitalPersona SerializationC# Structs to VB6 and vice versaDigitalPersona one touch for windows sdk version 1.4.0How to compare two fingerprint in Jascript using DigitalPersona SDK v 3.0.0

Translation of Scottish 16th century church stained glass

Will adding a BY-SA image to a blog post make the entire post BY-SA?

Customize circled numbers

Is possible to search in vim history?

Sampling Theorem and reconstruction

Do the concepts of IP address and network interface not belong to the same layer?

Flux received by a negative charge

How to align and center standalone amsmath equations?

How do ground effect vehicles perform turns?

How must one send away the mother bird?

Greco-Roman egalitarianism

Is XSS in canonical link possible?

How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?

A Permanent Norse Presence in America

Query about absorption line spectra

Journal losing indexing services

How do I implement a file system driver driver in Linux?

Is it improper etiquette to ask your opponent what his/her rating is before the game?

Did US corporations pay demonstrators in the German demonstrations against article 13?

Can we have a perfect cadence in a minor key?

Has Darkwing Duck ever met Scrooge McDuck?

What is the gram­mat­i­cal term for “‑ed” words like these?

Should I install hardwood flooring or cabinets first?

Reply 'no position' while the job posting is still there



DigitalPersona to Griaule(GrFingerX) or Vice Versa


How can I convert a Unix timestamp to DateTime and vice versa?How do you convert a byte array to a hexadecimal string, and vice versa?Converting XDocument to XmlDocument and vice versaMapping object to dictionary and vice versaConvert UIImage to NSString (and vice-versa)Converting BitmapImage to Bitmap and vice versaDigitalPersona SerializationC# Structs to VB6 and vice versaDigitalPersona one touch for windows sdk version 1.4.0How to compare two fingerprint in Jascript using DigitalPersona SDK v 3.0.0













0















Task: I have 30,000 fingerprint records in a SQL Server database, which is a binary(2000) datatype, and enrolled before thru DigitalPersona SDK.



I was developing an application in C# by using a Griaule(GrFinger) SDK. I am using Griaule SDK because 5 years ago I already developed an application using VB6 and I don't have any problem with it, come to speed in fetching data using 1:N, but now I don't know how to compare or convert the template using GrFinger to DigitalPersona record. I am new to C# so i was hoping for your understanding if i might have some clarification when it comes to C#.



How do I solve this problem?



Screenshot:



Screenshot



Code:



 public int Identify(ref int score, string sqlQuery)

GRConstants result;
int id;
OleDbDataReader rs;
TTemplate tptRef;
// Checking if template is valid.
if (!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting identification process and supplying query template.
result = (GRConstants)_grfingerx.IdentifyPrepare(ref _tpt._tpt,(int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting enrolled templates from database.
rs = _DB.getTemplates(sqlQuery);// query source is "select EmployeeFingerPrint,EmployeeID from RegFingers"
while (rs.Read())

// Getting current template from recordset.
tptRef = _DB.getTemplate(rs);
// Comparing current template.
result = (GRConstants)_grfingerx.Identify(ref tptRef._tpt,ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);
// Checking if query template and the reference template match.
if (result == GRConstants.GR_MATCH)

id = _DB.getId(rs);
rs.Close();
return id;

else if (result < 0)

rs.Close();
return (int)result;


// Closing recordset.
rs.Close();
return (int)GRConstants.GR_NOT_MATCH;

// Returns an OleDbDataReader with all enrolled templates from database.
public OleDbDataReader getTemplates(string sqlQuery)

OleDbCommand cmdGetTemplates;
OleDbDataReader rs;
//setting up command
cmdGetTemplates = new OleDbCommand(sqlQuery, _connection);
rs = cmdGetTemplates.ExecuteReader();
return rs;

// Return template data from an OleDbDataReader
public TTemplate getTemplate(OleDbDataReader rs)

long readedBytes;
tptBlob._size = 0;
Byte[] temp = new Byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];// alloc space
readedBytes = rs.GetBytes(0, 0, temp, 0, (int)temp.Length);// get bytes
Array.Copy(temp, 0, tptBlob._tpt, 0, (int)readedBytes);// copy to structure
tptBlob._size = (int)readedBytes;// set real size
return tptBlob;










share|improve this question



















  • 1





    Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

    – DaveInCaz
    Mar 8 at 12:14











  • actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

    – Jam Godz
    Mar 8 at 15:05















0















Task: I have 30,000 fingerprint records in a SQL Server database, which is a binary(2000) datatype, and enrolled before thru DigitalPersona SDK.



I was developing an application in C# by using a Griaule(GrFinger) SDK. I am using Griaule SDK because 5 years ago I already developed an application using VB6 and I don't have any problem with it, come to speed in fetching data using 1:N, but now I don't know how to compare or convert the template using GrFinger to DigitalPersona record. I am new to C# so i was hoping for your understanding if i might have some clarification when it comes to C#.



How do I solve this problem?



Screenshot:



Screenshot



Code:



 public int Identify(ref int score, string sqlQuery)

GRConstants result;
int id;
OleDbDataReader rs;
TTemplate tptRef;
// Checking if template is valid.
if (!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting identification process and supplying query template.
result = (GRConstants)_grfingerx.IdentifyPrepare(ref _tpt._tpt,(int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting enrolled templates from database.
rs = _DB.getTemplates(sqlQuery);// query source is "select EmployeeFingerPrint,EmployeeID from RegFingers"
while (rs.Read())

// Getting current template from recordset.
tptRef = _DB.getTemplate(rs);
// Comparing current template.
result = (GRConstants)_grfingerx.Identify(ref tptRef._tpt,ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);
// Checking if query template and the reference template match.
if (result == GRConstants.GR_MATCH)

id = _DB.getId(rs);
rs.Close();
return id;

else if (result < 0)

rs.Close();
return (int)result;


// Closing recordset.
rs.Close();
return (int)GRConstants.GR_NOT_MATCH;

// Returns an OleDbDataReader with all enrolled templates from database.
public OleDbDataReader getTemplates(string sqlQuery)

OleDbCommand cmdGetTemplates;
OleDbDataReader rs;
//setting up command
cmdGetTemplates = new OleDbCommand(sqlQuery, _connection);
rs = cmdGetTemplates.ExecuteReader();
return rs;

// Return template data from an OleDbDataReader
public TTemplate getTemplate(OleDbDataReader rs)

long readedBytes;
tptBlob._size = 0;
Byte[] temp = new Byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];// alloc space
readedBytes = rs.GetBytes(0, 0, temp, 0, (int)temp.Length);// get bytes
Array.Copy(temp, 0, tptBlob._tpt, 0, (int)readedBytes);// copy to structure
tptBlob._size = (int)readedBytes;// set real size
return tptBlob;










share|improve this question



















  • 1





    Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

    – DaveInCaz
    Mar 8 at 12:14











  • actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

    – Jam Godz
    Mar 8 at 15:05













0












0








0








Task: I have 30,000 fingerprint records in a SQL Server database, which is a binary(2000) datatype, and enrolled before thru DigitalPersona SDK.



I was developing an application in C# by using a Griaule(GrFinger) SDK. I am using Griaule SDK because 5 years ago I already developed an application using VB6 and I don't have any problem with it, come to speed in fetching data using 1:N, but now I don't know how to compare or convert the template using GrFinger to DigitalPersona record. I am new to C# so i was hoping for your understanding if i might have some clarification when it comes to C#.



How do I solve this problem?



Screenshot:



Screenshot



Code:



 public int Identify(ref int score, string sqlQuery)

GRConstants result;
int id;
OleDbDataReader rs;
TTemplate tptRef;
// Checking if template is valid.
if (!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting identification process and supplying query template.
result = (GRConstants)_grfingerx.IdentifyPrepare(ref _tpt._tpt,(int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting enrolled templates from database.
rs = _DB.getTemplates(sqlQuery);// query source is "select EmployeeFingerPrint,EmployeeID from RegFingers"
while (rs.Read())

// Getting current template from recordset.
tptRef = _DB.getTemplate(rs);
// Comparing current template.
result = (GRConstants)_grfingerx.Identify(ref tptRef._tpt,ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);
// Checking if query template and the reference template match.
if (result == GRConstants.GR_MATCH)

id = _DB.getId(rs);
rs.Close();
return id;

else if (result < 0)

rs.Close();
return (int)result;


// Closing recordset.
rs.Close();
return (int)GRConstants.GR_NOT_MATCH;

// Returns an OleDbDataReader with all enrolled templates from database.
public OleDbDataReader getTemplates(string sqlQuery)

OleDbCommand cmdGetTemplates;
OleDbDataReader rs;
//setting up command
cmdGetTemplates = new OleDbCommand(sqlQuery, _connection);
rs = cmdGetTemplates.ExecuteReader();
return rs;

// Return template data from an OleDbDataReader
public TTemplate getTemplate(OleDbDataReader rs)

long readedBytes;
tptBlob._size = 0;
Byte[] temp = new Byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];// alloc space
readedBytes = rs.GetBytes(0, 0, temp, 0, (int)temp.Length);// get bytes
Array.Copy(temp, 0, tptBlob._tpt, 0, (int)readedBytes);// copy to structure
tptBlob._size = (int)readedBytes;// set real size
return tptBlob;










share|improve this question
















Task: I have 30,000 fingerprint records in a SQL Server database, which is a binary(2000) datatype, and enrolled before thru DigitalPersona SDK.



I was developing an application in C# by using a Griaule(GrFinger) SDK. I am using Griaule SDK because 5 years ago I already developed an application using VB6 and I don't have any problem with it, come to speed in fetching data using 1:N, but now I don't know how to compare or convert the template using GrFinger to DigitalPersona record. I am new to C# so i was hoping for your understanding if i might have some clarification when it comes to C#.



How do I solve this problem?



Screenshot:



Screenshot



Code:



 public int Identify(ref int score, string sqlQuery)

GRConstants result;
int id;
OleDbDataReader rs;
TTemplate tptRef;
// Checking if template is valid.
if (!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting identification process and supplying query template.
result = (GRConstants)_grfingerx.IdentifyPrepare(ref _tpt._tpt,(int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting enrolled templates from database.
rs = _DB.getTemplates(sqlQuery);// query source is "select EmployeeFingerPrint,EmployeeID from RegFingers"
while (rs.Read())

// Getting current template from recordset.
tptRef = _DB.getTemplate(rs);
// Comparing current template.
result = (GRConstants)_grfingerx.Identify(ref tptRef._tpt,ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);
// Checking if query template and the reference template match.
if (result == GRConstants.GR_MATCH)

id = _DB.getId(rs);
rs.Close();
return id;

else if (result < 0)

rs.Close();
return (int)result;


// Closing recordset.
rs.Close();
return (int)GRConstants.GR_NOT_MATCH;

// Returns an OleDbDataReader with all enrolled templates from database.
public OleDbDataReader getTemplates(string sqlQuery)

OleDbCommand cmdGetTemplates;
OleDbDataReader rs;
//setting up command
cmdGetTemplates = new OleDbCommand(sqlQuery, _connection);
rs = cmdGetTemplates.ExecuteReader();
return rs;

// Return template data from an OleDbDataReader
public TTemplate getTemplate(OleDbDataReader rs)

long readedBytes;
tptBlob._size = 0;
Byte[] temp = new Byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];// alloc space
readedBytes = rs.GetBytes(0, 0, temp, 0, (int)temp.Length);// get bytes
Array.Copy(temp, 0, tptBlob._tpt, 0, (int)readedBytes);// copy to structure
tptBlob._size = (int)readedBytes;// set real size
return tptBlob;







c# sdk vb6 digital-persona-sdk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 11 at 12:27









DaveInCaz

3,33532042




3,33532042










asked Mar 8 at 6:37









Jam GodzJam Godz

43




43







  • 1





    Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

    – DaveInCaz
    Mar 8 at 12:14











  • actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

    – Jam Godz
    Mar 8 at 15:05












  • 1





    Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

    – DaveInCaz
    Mar 8 at 12:14











  • actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

    – Jam Godz
    Mar 8 at 15:05







1




1





Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

– DaveInCaz
Mar 8 at 12:14





Its not clear enough what specific problem you are facing... for instance can you point out in your code sample specifically what is not working, or what you are not sure about?

– DaveInCaz
Mar 8 at 12:14













actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

– Jam Godz
Mar 8 at 15:05





actually there is an existing database with fingerprint saved with dataType binary(2000), but those record was enrolled/saved using DigitalPersona SDK, my problem is, i am using GrFinger(Griaule SDK) for timekeeping using time-in & time off, im having problem matching the fingerprint in database, i am using the identify function, for 1:N. i know it need to convert first the template to match the formatting that is saved in database before comparing the matching process. i have found some codes, but i dont know how im gonna used it in c#

– Jam Godz
Mar 8 at 15:05












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057945%2fdigitalpersona-to-griaulegrfingerx-or-vice-versa%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057945%2fdigitalpersona-to-griaulegrfingerx-or-vice-versa%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229