【发布时间】:2015-10-13 05:26:31
【问题描述】:
我已经阅读了很多关于这个问题的文章。但是没有得到正确的答案,或者可能是我无法理解。
我有一个表格,将收据编号、批号和收据副本作为图像存储在数据库中
例如:Referenceid : int 批号:整数 收据压缩:图片
我正在尝试在 datagridview 中显示这些数据
Dim sqlString As String
Dim storeID As String
Dim saleDate As String
Dim ds As DataSet
With DataGridView1
storeID = .CurrentRow.Cells(1).Value
saleDate = .CurrentRow.Cells(2).Value
End With
sqlString = "select batchnumber, [time],ReceiptCompressed from Journal where TransactionType=16 and StoreId ='" & storeID & "'" & _
" and [Time] between '" & saleDate & " 00:00:00' and '" & saleDate & " 23:59:59'"
ds = getDataset(connectionString, sqlString)
DataGridView2.DataSource = ds.Tables(0)
问题是加载数据时出现错误。
"datagridview出现如下错误
system.argumentexception.image.fromstream(system system, boolean useembeddedcolormanagement, boolean validateimagedata" etc.....
谁能告诉我最简单的方法是什么?如前所述,存储在表中的数据我想与图像一起加载到 datagridview 中。
谢谢 文卡特
【问题讨论】:
-
图片是these格式之一吗?
标签: vb.net datagridview populate