Dim fInfo As New FileInfo(txtcv.Text) Dim numBytes As Long = fInfo.Length Dim fStream As New FileStream(txtcv.Text, FileMode.Open, FileAccess.Read) Dim br As New BinaryReader(fStream) Dim data As Byte() = br.ReadBytes(CInt(numBytes)) br.Close() fStream.Close() con.Open() cmd.Parameters.AddWithValue("@CV", data)
If sdr.HasRows Then While sdr.Read() If sdr("CV") IsNot System.DBNull.Value Then Dim data As Byte() = DirectCast(sdr("CV"), Byte()) Dim ms As New MemoryStream(data) Me.data.Text = IO.File.ReadAllBytes(data) End If End While sdr.Close() End If con.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)