getting an Image from DataSet
-
I've a database access with 1 OLE OBJECT field contained an Image. I've queried the database the result is in the DataSet. Now i would to get the image contained here: myDataSet.Tables[0].Rows[i]["Image"] how?
-
You can read data from a DataSet simply by using the following code: byte[] _Image = (byte[])myDataSet.Tables[0].Rows[0]["Image"]; MemoryStream ms=new MemoryStream(_Image); Image image=Image.FromStream(ms); Now you have your image reconstructed if you have stored it as binary data. Akif
-
You can read data from a DataSet simply by using the following code: byte[] _Image = (byte[])myDataSet.Tables[0].Rows[0]["Image"]; MemoryStream ms=new MemoryStream(_Image); Image image=Image.FromStream(ms); Now you have your image reconstructed if you have stored it as binary data. Akif
-
i've do it but i get error, maybe becouse i have set the image within Microsoft Access instead in my c#application. Could be it the cause? Just another question: if i set another kind of file as a word file or a .xls how can know what kind the file is it?
I didnt get your point. Will you specify it in more details whats the problem Akif