使用sql获取
Dim cmd As new SQLCommand
cmd.ConnectionName = "d"
cmd.CommandText="select top 1 照片 from 员工"
Dim dt As DataTable = cmd.ExecuteReader
Dim src As String
If dt.DataRows.Count >0 Then
Dim imagebytes As Byte() = dt.DataRows(0)("照片")
Dim ms As new System.IO.MemoryStream(imagebytes )
e.Form.Controls("PictureBox1").image = System.Drawing.Image.FromStream(ms)
End If
[此贴子已经被作者于2019/7/15 11:57:14编辑过]