Monday, December 6, 2010
Store and Display Images from MS Access Database Using C#
using System.Data.OleDb;
OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0
using System.IO;
IO is used to create the memory stream variable that can store the binary format of the image content.
C# Code to Upload Image to MS Access Database:
int imageSize;
string imageType; Stream imageStream;
// Gets the Size of the Image
imageSize = fileImgUpload.PostedFile.ContentLength;
// Gets the Image Type
imageType = fileImgUpload.PostedFile.ContentType;
// Reads the Image stream
imageStream = fileImgUpload.PostedFile.InputStream;
byte[] imageContent = new byte[imageSize]; int intStatus; intStatus = imageStream.Read(imageContent, 0, imageSize);
Connection string to connect the ASP.Net 2.0 web application with MS Access Database:
Download & View More Detail : http://programming.top54u.com/post/Store-and-Display-Images-from-MS-Access-Database-Using-C-Sharp.aspx
-
The following article discusses the WPF command binding feature with relation to Mouse clicks. One of WPF powerful features is the bindin...
-
SQL Server has never been short of ways to read from and write to files and it is always better to use the standard techniques provided b...
-
In this article we will look at the basics of Angular.Js. This is the first part of an article series. The main objective of this series i...