ArgumentException at system.Drawing.Image.FromStream in c#

  • Thread starter Thread starter Manvendra Kumar
  • Start date Start date
M

Manvendra Kumar

i ran directly a query (select * from objects) in SQL. Message in one column
displayed a mesage <Binary data>. when i am trying to retreived this cloumn
using c#, i get exception error. While debugging i found that error was
reproducible at dataGridView3.DataSource = bindingSource1;

"bindingSource1.DataSource = GetData(SqlQuery);" i used this to get data
from SQL. getdata is my function.

if i leave this column my program run fine. Is there any Solution?
 
i ran directly a query (select * from objects) in SQL. Message in one column
displayed a mesage <Binary data>. when i am trying to retreived this cloumn
using c#, i get exception error. While debugging i found that error was
reproducible at dataGridView3.DataSource = bindingSource1;

"bindingSource1.DataSource = GetData(SqlQuery);" i used this to get data
from SQL. getdata is my function.

if i leave this column my program run fine. Is there any Solution?

I don't think that you can map a BINARY field from a SQL table to a
grid column and expect it to know it's an image. Most probably you
will have to at least create the image from the binary data and then
show the image

Is this a web or a win app?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top