好像只是主表可以,临时表不支持的,试试直接查询,如 CurrentChanged
Dim pbx As WinForm.PictureBox = Forms("核价系统主表").Controls("PictureBox1")
If e.Table.Current Is Nothing Then
pbx.Image = Nothing
Else
Dim cmd As New SQLCommand
Dim ds As DataTable
cmd.ConnectionName = "xxx"
cmd.CommandText = "SELECT 款式图片 Fr om {核价系统} where [_Identify] = " & e.Table.Current("_Identify")
ds = cmd.ExecuteReader()
If ds.datarows.count > 0 Then
Dim imageByte() As Byte = ds.datarows(0)("图片列")
Dim ms As New system.IO.MemoryStream(imageByte) '将字节数组转换为二进制流
Dim image As Image = Image.FromStream(ms)
pbx.Image = image
else
pbx.Image = Nothing
End If
End If
[此贴子已经被作者于2020/3/1 22:50:36编辑过]