what is the data type to store the image in sql database and sqlsever database and how can we retrieve that
Saving image in databasesaving image in sql database
Page 1 of 1
1 Replies - 683 Views - Last Post: 03 March 2009 - 12:13 AM
Replies To: Saving image in database
#2
Re: Saving image in database
Posted 03 March 2009 - 12:13 AM
The data type would be IMAGE (SQL 2000) or VARBINARY(MAX) (SQL 2005). As for the code to save and retrieve you're going to need to show us what you've tried thus far, we're not just going to give you the required code. I can tell you that the image will need to be converted to a byte array, then saved into the database table. To retrieve and display the image you're going to need to retrieve the data, convert it into a byte array, then pass it to a MemoryStream, then create the image from the stream
[rules][/rules]
[rules][/rules]
Page 1 of 1
|
|

New Topic/Question
This topic is locked




MultiQuote



|