数据库中字段存放的是base64字符,然后切换记录时显示对应的图片
'+++++++根据当前记录显示数据库中的图片++++++++++++++++
If e.Table.Cols.Contains("产品编号") Then
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "s elect 示意图 from ZL_SKU where SKU编码='" & cur("产品编号") & "'"
If cmd.ExecuteScalar <> "" Then
e.Form.Controls("PictureBox1").Image = Functions.Execute("Base64ToImage",cmd.ExecuteScalar)
Else
e.Form.Controls("PictureBox1").Image = Nothing
End If
End If
第一次加载时会出现“未将对象引用设置到对象的实例。”关掉就好了,这是什么问题?