Monday, July 27, 2009

How can I Save and retrieve images in MS Access Database using C#?

I have Microsoft Access Database and I m using C# as frontend in an ASP.Net Web Application.I have to save some images into the database and then retrieve them and show them in a grid.Plz help me out through the coding for that purpose.I know the process for SQL Server but dont know what data type should be used for images in Access Database.So be sure to send code for MS Access not for Sql Server.Urgent help needed .Thanks in advance....

How can I Save and retrieve images in MS Access Database using C#?
The code is exactly the same... you'll want to stream it just as you would for SQL Server.





All you need to do is change the data type inside the database to "Object OLE"... and change any references inside your SQL Server code from "Image" (or varbinary(max) ), to also Object OLE.





Don't forget to change your namespace from System.Data.SQLClient to System.Data.OleDb!
Reply:You can use OLE Object field in MS Access to store binary stream of Image content...
Reply:OLE object is the datatatype for pictures in MSAccess.





just search for OLE object in MSaccess in Google.


No comments:

Post a Comment