Private Sub DataGrid1_DoubleClick() Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.DoubleClick StrSQL = "Select * from PackingImage WHERE SysID='" & Me.DataGrid1.Item(Me.DataGrid1.CurrentRowIndex, 0) & "'" Dim obj_Command As New SqlCommand(StrSQL, Myconn) obj_Command.CommandType = CommandType.Text Dim obj_Dr As SqlDataReader Myconn.Open() obj_Dr = obj_Command.ExecuteReader obj_Dr.Read() Me.Label2.Text = obj_Dr.Item("PartName") If Not IsDBNull(obj_Dr.Item("image")) Then Dim obj_byte() As Byte = obj_Dr.Item("image") Dim obj_Stream As New MemoryStream(obj_byte, True) obj_Stream.Write(obj_byte, 0, obj_byte.Length) Me.PictureBox1.Image = New Bitmap(obj_Stream) Else Me.PictureBox1.Image = Nothing Me.Label2.Text = "" End If Myconn.Close() obj_Command.Dispose() obj_Stream = Nothing End Sub