Save and Retrieve images from Access Database (mdb file) in ASP.Net using C#

Last Reply on Apr 17, 2015 07:29 AM By Mudassar

Posted on Apr 15, 2015 09:52 PM

I have used following code to save image but it shows following error:

Code :

byte[] fileByte = null;
            string path = openFileDialog1.FileName;
            FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read);
            BinaryReader br = new BinaryReader(fs);
            long allbyte = new FileInfo(path).Length;
            fileByte = br.ReadByte((Int32)allbyte);
            fs.Close();
            fs.Dispose();
            br.Close();

Error :

Error 1 No overload for method 'ReadByte' takes '1' argument

 

please solve above problem and also provide the solution for reading image same as converted via above code

Posted on Apr 17, 2015 07:29 AM

Refer

http://www.mikesdotnetting.com/article/123/storing-files-and-images-in-access-with-asp-net

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html