Reputation: 1176
What's the best way to store an image in a database in binary format, and how can I implement it using C#?
Upvotes: 3
Views: 8492
Reputation: 1967
You can find the answer to converting your image to binary here:
You would need a BLOB column in your SQL database in order to be able to insert it.
EDIT:
If you want to retrieve it back from the database, you can use the following article to do so:
http://support.microsoft.com/kb/326502
Upvotes: 2
Reputation: 5043
If you are using SQL Server, you can use the Image column type.
Upvotes: 3