使用sql,如
Dim cmd As new SQLCommand
cmd.ConnectionName = "T"
cmd.CommandText="select top 1 第八列 from {表A}" '这里第八列是二进制列
Dim dt As DataTable = cmd.ExecuteReader
Dim src As String
If dt.DataRows.Count >0 Then
Dim bs As Byte() = dt.DataRows(0)("第八列")
Dim stream As System.IO.Stream = New System.IO.MemoryStream(bs)
Dim bmp As System.Drawing.Bitmap = New System.Drawing.Bitmap(stream)
Dim pbx As WinForm.PictureBox = Forms("窗口1").Controls("PictureBox1
pbx.Image = bmp
End If