本文介绍了如何使用来自SQL Server的图像的数据填充datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 您好b $ b 我已经阅读了很多关于这个问题的文章。但没有得到正确的答案或者可能是我无法理解。 我有一张桌子,将收据编号,批号和收据副本存储为数据库中的图像 for ex:Referenceid:int batchnumber:int 收据压缩:图片 我是尝试在datagridview中显示这些数据。HiI've gone through many articles about this issue. But didn't get a proper answer or may be I'm not able to understand.I've a table which stores receipt number, batch numbers and a copy of receipt as image in databasefor ex: Referenceid : int batchnumber : int receiptcompressed : imageI'm trying display this data in datagridview.Dim sqlString As String 'Dim cmd As SqlCommand 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(系统系统,布尔值useembeddedcolormanagement, boolean validateimagedataetc ..... 谁能告诉我最简单的方法是什么?如上所述存储的数据在表中我想加载到datagridview和图像。 谢谢 VenkatProblem is an error is coming while loading the data."The following error occured in the datagridviewsystem.argumentexception.image.fromstream(system system, boolean useembeddedcolormanagement, boolean validateimagedata " etc.....Can anyone tell me what is the simplest way to do this? As mentioned data stored in table I want to load into datagridview along with image.ThanksVenkat推荐答案 这篇关于如何使用来自SQL Server的图像的数据填充datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-03 11:50