图像转换生成异常

时间:2012-09-13 06:49:19

标签: c#-4.0 sql-server-2008-r2

我需要从三个表中记录我为此编写sql查询。但是在前端为文本框和图片框分配值时.excption是生成的。

  

来源:System.Drawing消息:参数无效。方法:   System.Drawing.Image FromStream(System.IO.Stream,Boolean,Boolean)   堆栈跟踪:

     

at System.Drawing.Image.FromStream(Stream stream,Boolean   useEmbeddedColorManagement,Boolean validateImageData)at   System.Drawing.Image.FromStream(Stream stream)。

我的SQL查询是

select s.Name,s.FatherName,CAST(s.Picture as varbinary)as picture,s.Description,SUM(l.Amount) as Loan,SUM(p.Amount) as Paid from Staff s 
left outer join Loan l on s.StaffID=l.StaffID left outer join Payment p on l.StaffID=p.StaffID where s.StaffID=17 group by s.Name,s.FatherName,Description,CAST(Picture as varbinary)

0 个答案:

没有答案