image from SQL

H

Hrvoje Voda

Does anyone knows how to get an image from sql database?

I managed to save an image(binary) into table, but I don't know how to
"transformed" it back to my aplication into grid.

Hrcko
 
G

Glen Wilkin via DotNetMonster.com

System.Data.SqlClient.SqlDataReader ldrReader;
ldrReader = mobjData.OpenDataReader("spGetImage",
"@n_ImageID",lintImageID);
ldrReader.Read();
byte[] lbteBlobData = new byte[0];
lbteBlobData = (byte[])ldrReader[0];
 

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

Top