Panjiyar Rahul
Panjiyar Rahul

Reputation: 1176

Store images in database as binary data

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

Answers (2)

Steven Ryssaert
Steven Ryssaert

Reputation: 1967

You can find the answer to converting your image to binary here:

Convert image to binary?

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

FarligOpptreden
FarligOpptreden

Reputation: 5043

If you are using SQL Server, you can use the Image column type.

Upvotes: 3

Related Questions