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 cn As SqlConnection = New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=dataBEST;Integrated Security=True;Pooling=False") Dim cmd As SqlCommand = New SqlCommand("INSERT INTO fininger_table VALUES(@FIRSTNAME, @LASTNAME, @FINGERPRINT)", cn) 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 cn.Open() cmd.ExecuteNonQuery() cn.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)