Public Sub picshow() Using cmd As New SqlCommand("Select * From Staff where StaffID='" & txtAA.Text & "'", GlobalClass.con) Using dr As SqlDataReader = cmd.ExecuteReader() Using dt As New DataTable dt.Load(dr) Try Dim row As DataRow = dt.Rows(0) Using ms As New MemoryStream(CType(row("Photo"), Byte())) Dim img As Image = Image.FromStream(ms) PictBox.Image = img '<-- Here is the problem "with Image" End Using Catch ex As Exception GoTo err End Try Exit Sub End Using End Using End Using GlobalClass.con.Close() err: End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)