Export Image

R

Rafael tejera

I need to export Image from my Mssql 2000

I'm using a dara reader for that, but my code it is not working.

How I can save bImage = (byte[]drMyReader["MyImage"]

To a file?

I had used MemoryStream and FileStream. What I'm doing wrong?

MemoryStream ms = new MemoryStream(bImage);
Bitmap mybitmap = new Bitmap(ms);

mybitmap.Save(ImagePath, System.Drawing.Imaging.ImageFormat.Jpeg);


Any idea?


Rafael
 

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