cmd = New SqlCommand("select imgFile from myImages where imgId=@param", conn)
cmd.Parameters.Add("@param", SqlDbType.NVarChar, 30)
Dim img As Byte() = DirectCast(cmd.ExecuteScalar(), Byte())
Dim str As New MemoryStream()
str.Write(img, 0, img.Length)
Dim bit As New Bitmap(str)