How to match a fingerprint template from database ?

i now can save a fingerprint template from database using this code..
Dim fingerprintData As MemoryStream = New MemoryStream
Template.Serialize(fingerprintData)
fingerprintData.Position = 0
Dim br As BinaryReader = New BinaryReader(fingerprintData)
Dim bytes() As Byte = br.ReadBytes(CType(fingerprintData.Length, Int32))
Dim cmd As SqlCommand = New SqlCommand("INSERT INTO fininger_table VALUES(@FIRSTNAME, @LASTNAME, @FINGERPRINT)", conn)
cmd.Parameters.Add("FIRSTNAME", SqlDbType.VarChar).Value = CaptureForm.tboxFname.Text
cmd.Parameters.Add("LASTNAME", SqlDbType.VarChar).Value = CaptureForm.tboxLname.Text
cmd.Parameters.Add("FINGERPRINT", SqlDbType.Image).Value = bytes
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
and i fetch the data when the form is load..
conn.Open()
Dim cmd As New SqlCommand("SELECT * FROM Fininger_table", conn)
Dim rdr As SqlDataReader = cmd.ExecuteReader()
Dim MemStream As IO.MemoryStream
Dim fpBytes As Byte()
While rdr.Read()
fpBytes = rdr("FINGERPRINT")
MemStream = New IO.MemoryStream(fpBytes)
Dim template As New DPFP.Template(MemStream)
OnTemplate(template)
' template.DeSerialize(MemStream)
End While
rdr.Close()
conn.Close()
and now i'm stuck..i dont know how to match the fingerprint from the database to verify the user..
plz help me out..tnx in advance
btw im using a DIGITAL PERSONA FINGERPRINT READER..with the OTW SDK

Hello My dear Brother 
                I am zaid Ahmad khan would like to help you and this is the working code please see this and you will have the solution 
Imports System.Data.SqlClient
Imports DPFP
Public Class Form1
    Private WithEvents verifyControl As DPFP.Gui.Verification.VerificationControl
    Private matcher As DPFP.Verification.Verification
    Private matchResult As DPFP.Verification.Verification.Result
    Private allReaderSerial As String = "00000000-0000-0000-0000-000000000000"
    Public template As DPFP.Template
    Private userTemplateColumn As String = "Template"
    Private userIDColumn As String = "ID"
    Dim bytes As Byte()
    Private Sub CreateDPControl(ByRef control As DPFP.Gui.Verification.VerificationControl)
        Try
            control = New DPFP.Gui.Verification.VerificationControl()
            control.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
            control.Name = "verifyControl"
            control.Location = New System.Drawing.Point(0, 0)
            control.ReaderSerialNumber = "00000000-0000-0000-0000-000000000000"
            control.Visible = True
            control.Enabled = True
            control.BringToFront()
            Me.Controls.Add(control)
        Catch ex As Exception
            MessageBox.Show("exception")
        End Try
    End Sub
    Private Function ConnectString() As String
        Dim connectionString As String
        connectionString = "Server=localhost;database=bs;User ID=sa;Password=123"
        Return connectionString
    End Function
    Private Sub VerifyBiometric_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        matcher = New Verification.Verification()
        matchResult = New Verification.Verification.Result
        CreateDPControl(verifyControl)
    End Sub
    Private Sub verifyControl_OnComplete(ByVal Control As Object, ByVal FeatureSet As DPFP.FeatureSet, ByRef EventHandlerStatus As DPFP.Gui.EventHandlerStatus) Handles verifyControl.OnComplete
        Dim dataSet As DataSet = New DataSet()
        Dim adapter As SqlDataAdapter = New SqlDataAdapter()
        Dim sqlCommand As SqlCommand = New SqlCommand()
        Dim ctr = 0
        Try
            Dim max As Integer = 0
            Dim cn As New SqlConnection(ConnectString())
            cn.Open()
            sqlCommand.CommandText = "Select templateBytes7 from userthumbs where id='1029'"
            sqlCommand.CommandType = CommandType.Text
            sqlCommand.Connection = cn
            Dim lrd As SqlDataReader = sqlCommand.ExecuteReader()
            Dim usr
            While lrd.Read()
                usr = lrd("templateBytes7")
            End While
            bytes = Nothing
            bytes = usr
            template = New DPFP.Template()
            template.DeSerialize(usr)
            'Perform match
            matcher.Verify(FeatureSet, template, matchResult)
            If matchResult.Verified Then
                EventHandlerStatus = Gui.EventHandlerStatus.Success
                MsgBox("Verified!")
                Me.Hide()
                MessageBox.Show("Done")
            Else
                EventHandlerStatus = Gui.EventHandlerStatus.Failure
                MsgBox("Please Try Again!")
            End If
        Finally
        End Try
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    End Sub
End Class

Similar Messages

  • Can I download all custom xml templates from database

    Hi,
    We are going to implement VSS ( Version Software Management Tool ) to manage the version / history of all custom objects.
    For that we need to download all custom objects on another server.
    it is very tedious and time consuming to download individual xml template from front end.
    How can I extract all custom templates from database? Is there any tool available ?
    Regards,
    Jay

    You can only sync to one computer.
    If you still have your old computer copy the iTunes media library over to your new MAC.
    see this link Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • I would like to know how can I have the templates from premiere as customer of adobe creative cloud

    I would like to know how can I have the templates from premiere.
    I am Adobe Creative Cloud member.
    Thanks
    Dmitre Raposo

    Not sure what you are referring to. If you have any files MIA, simply re-download and reinstall the app via AAM.
    Mylenium

  • How do I delete my templates from Word 2011 in OSX 10.8.5

    How do I delete my templates from Word 2011 in OSX 10.8.5?  I cannot find user/library in the finder.  Please help.

    They will be in the MS Templates folder located in the MS Office folder in your Applications folder.
    Exposing the /Home/Library/ Folder
    Pick one of the following methods:
    A. This method will make the folder visible permanently. Open the Terminal application in your Utilities folder and paste the following at the command prompt:
    chflags nohidden ~/Library
    Press RETURN.
    B. Click on the Desktop, press the OPTION (⌥) button, select Library from the Finder's Go menu.
    C. Select Go To Folder from the Finder's Go menu. Paste the following in the path field:
    ~/Library
    Press the Go button.

  • How do I eliminate unnecessary templates from "My Templates?"

    How do I eliminate unnecessary templates from "My Templates?"

    What application do these templates refer to?

  • How many method can pass data from Database to front-end(aspx)?

    How many method can pass data from Database to front-end(aspx)?
    By using ajax, I want show some data to aspx or html
    Here is one of these method,
    HTTP Handler(ashx):
    we can json data, use HTTP Handler pass data to front-end
    And can we do this by other method? Web API? or some fancy way?
    Thanks for any reply

    Hello TaiwanWei,
    Try forums.asp.net.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to call a rtf template from another rtf template by passing a value

    Hi Gurus,
    Its about calling a rtf template from another rtf template by passing a value.
    My requirement is like:
    I got a quote report from Siebel, based on the product PartNumber I need to pull product description or literature from another database database.
    My approach is something like; get a partnumber from quote report pass it to another rtf template which uses the partnumber and get the data from table using DataSource. When user pull a quote report from siebel this new rtf template should attach to the quote at the end.
    I've gone through all available blogs about sub-reports and white papers from Oracle they are not much helpful since I need step-by-step.
    http://www.adivaconsulting.com/adiva-blog/item/36-working-with-rtf-sub-templates.html
    bip-subtemplate-1-132933.pdf
    I'm using 10g obiee integrated with Siebel.
    Just started learning BIP.
    Thanks in advance.
    Edited by: 911927 on Apr 2, 2013 8:56 AM
    Edited by: 911927 on Apr 2, 2013 8:57 AM

    How to call a rtf template from another rtf template by passing a value try in main template create hyperlink of url with parameters for another template
    http://bipconsulting.blogspot.ru/2010/02/drill-down-to-detail-or-another-report.html
    When user pull a quote report from siebel this new rtf template should attach to the quote at the end.it'll be only another report
    IMHO you can not attach it to main. it'll be second independent report
    you can try subtemplate but it's not about rtf from rtf by click
    it's about call automatically rtf subtemplate from main rtf based on some conditions
    for example, main template contain some data and if some condition is true then call subtemplate and place it instead of its condition

  • How can i get the data from database & add them as a link

    Hi,
    how can i get a data from a database(DB2) and that data will be having a file so i should make them as a link.i tried it in jsp .
    <%
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
    Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");     
    response.setContentType("text/html");
    Connection conn = null;
    conn = DriverManager.getConnection("jdbc:db2:spintran");
    Statement stmt = conn.createStatement();
    stmt.executeQuery("set current schema tut");
    ResultSet rs = stmt.executeQuery("select * from tutorial");     
    %>
    Type Of the Category : &nbsp&nbsp&nbsp
    <%
         while (rs.next())
         String desc = rs.getString(1);     
         out.println(desc);
    %>
         <A HREF = "<%=desc%>"><%=desc%> </A>
         <%
         %>
    but it is not working.how can i link.
    thank you.

    what is desc? is it the file name ? whats the data type of desc in db? INFILE?
    if desc is just the name of the file, then make sure that such a file exists in the proper folder.only then the link works..
    that is, if desc is 'a.jpg' then a.jpg should be existing in the same folder as your html is.

  • How do you copy the templates from another webstie and use them as your own?

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver? I would like to know I am a newbie when it comes to this program so please make your statement understandable for me, thanks. Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver?
    This is difficult to understand.   How are you copying templates from another site?
    If you have all the files that make up the template, then it's only a matter of saving all the files to a folder on your hard drive and setting up a site definition pointing to this folder.  You then work on the files as usual.
    Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.
    Without seeing the page it's difficult to judge what your problem is.  If possible, please upload the files to a remote server and provide a link to the page. It's the only way people can help - if they see your page in action.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • WPF- How to save and retrieve details from database

    I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
    am getting errors in my code, kindly advice below are the required code
    xaml
    <Grid>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
            <Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
            <Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
            <Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
            <Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
            <WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
                <wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
            </WindowsFormsHost>
        </Grid>
    cs
    private void Browse(object sender, RoutedEventArgs e)
                SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
                try
                    OpenFileDialog dlg = new OpenFileDialog();
                    dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
                    dlg.Title = "Select Student Picture";
                    if (dlg.ShowDialog() == DialogResult.OK)
                        imgLoc = dlg.FileName.ToString();
                        picStu.ImageLocation = imgLoc;
                catch(Exception ex)
                    System.Windows.MessageBox.Show(ex.Message);
    Thank you
    Jayjay john

    Hi Joakins,
    I think Lloyd has a point here in that all I see there which is really database related is a connection string.
    Maybe your question is more general though and you're just asking how to work with a database as a general principle.
    Personally, I like entity framework and would recommend that.
    You can read a shed load of stuff about it.
    https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
    With WPF almost every dev uses MVVM and I'm no exception.
    You may find this interesting:
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The article for the second in the series is only partly written, but the sample is complete:
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to get time specification detail from database

    Dear All,
    How can I get the time specification detail from data base?
    Time specification is a 32 bit hexadecimal no type guid_32.
    Function wfd_timespec_reload provide the modified time specification detail.
    FUNCTION wfd_timespecs_reload
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_LOGSYS) TYPE  LOGSYS
    *"     VALUE(I_AWTYP) TYPE  WFD_AWTYP
    *"     VALUE(IT_TIMESPEC_KEYS) TYPE  WFD_KEY_TAB
    *"  EXPORTING
    *"     VALUE(ET_TIMESPEC_DETAILS) TYPE  WFD_TIMESPEC_TAB
    *"     VALUE(ET_INVALID_TIMESPECS) TYPE  WFD_KEY_TAB
    *"     VALUE(ET_CHANGED_TIMESPEC_KEYS) TYPE  WFD_KEY_TAB
    *"     VALUE(ET_RETURN) TYPE  BAPIRET2_T
    This function take time spec from data base not from cache(buffer) so provide the modified time spec in the same session.
    I need any newly created time specification detail also. So I can show all the time spec detail in my function module for any user in the same session.
    Can anyone provide the sample code for it?
    Thanks,
    Anup Garg

    Yes I can see the pattern.
    When I get the set of numbers from database UI doesn't know what is the the list of numbers database has. I need to choose some next available number that is not in database. In the list that u are talking about next available number is 7. Its something similar to when we try to create any mailid, while registration it gives some default id which is not existing which user can choose to create his mailid. How can I get similar feature?

  • How to get data in jtable from database

    i m working on core java application i want to use jtable to show records to user. jtable will get records from mssql database. how to do this.. i m new so plz tell me briefly..with coding...
    thanks

    i have use this link:
    import java.sql.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    * This class takes a JDBC ResultSet object and implements the TableModel
    * interface in terms of it so that a Swing JTable component can display the
    * contents of the ResultSet. Note that it requires a scrollable JDBC 2.0
    * ResultSet. Also note that it provides read-only access to the results
    public class ResultSetTableModel implements TableModel {
    ResultSet results; // The ResultSet to interpret
    ResultSetMetaData metadata; // Additional information about the results
    int numcols, numrows; // How many rows and columns in the table
    * This constructor creates a TableModel from a ResultSet. It is package
    * private because it is only intended to be used by
    * ResultSetTableModelFactory, which is what you should use to obtain a
    * ResultSetTableModel
    ResultSetTableModel(ResultSet results) throws SQLException {
         this.results = results; // Save the results
         metadata = results.getMetaData(); // Get metadata on them
         numcols = metadata.getColumnCount(); // How many columns?
         results.last(); // Move to last row
         numrows = results.getRow(); // How many rows?
    * Call this when done with the table model. It closes the ResultSet and
    * the Statement object used to create it.
    public void close() {
         try { results.getStatement().close(); }
         catch(SQLException e) {};
    /** Automatically close when we're garbage collected */
    protected void finalize() { close(); }
    // These two TableModel methods return the size of the table
    public int getColumnCount() { return numcols; }
    public int getRowCount() { return numrows; }
    // This TableModel method returns columns names from the ResultSetMetaData
    public String getColumnName(int column) {
         try {
         return metadata.getColumnLabel(column+1);
         } catch (SQLException e) { return e.toString(); }
    // This TableModel method specifies the data type for each column.
    // We could map SQL types to Java types, but for this example, we'll just
    // convert all the returned data to strings.
    public Class getColumnClass(int column) { return String.class; }
    * This is the key method of TableModel: it returns the value at each cell
    * of the table. We use strings in this case. If anything goes wrong, we
    * return the exception as a string, so it will be displayed in the table.
    * Note that SQL row and column numbers start at 1, but TableModel column
    * numbers start at 0.
    public Object getValueAt(int row, int column) {
         try {
         results.absolute(row+1); // Go to the specified row
         Object o = results.getObject(column+1); // Get value of the column
         if (o == null) return null;
         else return o.toString(); // Convert it to a string
         } catch (SQLException e) { return e.toString(); }
    // Our table isn't editable
    public boolean isCellEditable(int row, int column) { return false; }
    // Since its not editable, we don't need to implement these methods
    public void setValueAt(Object value, int row, int column) {}
    public void addTableModelListener(TableModelListener l) {}
    public void removeTableModelListener(TableModelListener l) {}
    the table is showing column name from database but not showing the data in row now what to do

  • How can I access "my templates" from iPad or iPhone?

    Hello,
    I have created some templates with numbers but cannot "open=> new=> my templates" from my mini or iphone.  It seems like it's only available on my imac or mac book.   The only work around that I have have to open a new doc and save it and continually duplicate for new forms.  I would hope that apple would think of this.  Any advise would be great.
    Thanks,
    David

    The templates are stored locally.  If you want to move a template then you can open the tempate on the machince where they already exist, then save as a file (let's say on you desktop), then email, or move (using a flash drive) to the Mac mini.
    Open the file on the mac mini and save as a template.
    I do not have Numbers on an iOS device so I cannot say how to get it to your iphone.  I would think you can share the document using iCloud then open from iCloud on the phone and save as a template.

  • How do you remove a template from a page?

    I want to remove a template from some of my pages and can't
    figure out how to??

    The much better thing to do is to modify the template to
    accommodate the
    different layouts - that way, everything is still under
    template control,
    and you don't have to remember to also change things in those
    pages you have
    detached.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "SilverRoad" <[email protected]> wrote in
    message
    news:f85pmk$okm$[email protected]..
    > because these pages have a different format. i figured
    out how to do it
    > with modify - templates.

Maybe you are looking for

  • Spry Collapsible Panel Problem with Safari

    Hi my Spry Collapsible Panel looks great in Firefox, Camino, and IE, but the top border, which I am using as a line to divide items in the list, and which I have specified in the CSS page, doesn't show up in Safari and Google Chrome.  Just nothing, a

  • Truncation of selection screen field in reports

    Hi, Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare: SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS The length of this field in the table is 30 chars. However, on displaying the field via s

  • RH9 Webhelp Search function is not working properly

    Hi, My organization is using RH9 for a Webhelp project.  My company and our client are restricted to using IE9 for the online help I have created for this project, and our OS environment is Windows 7.  When I generate using the Webhelp layout, with t

  • Jsp and tomcat 4.0

    Hi every body please we want your help immediately, we want to run java file and jsp files togather using tomcat4.0.

  • Is there a way to hyperlink the TOC?

    I would really love if there was a way to get the table of contents to have hyperlinks to the headings and subheadings that it displays. Any way to do that?