Question:
How to store and retrieve images in SQL server database through VB.NET?
Answer:
SQL Server supports the ability for clients to store objects within tables Source: CoolInterview.com
Image file can be save in SQL server as a byte. Henceforth, the image is convert to a stream of byte using the IO.Memory Stream. This stream of byte can be save in a table with image data type. The process has to be reverse to retrieve the image from the server. Source: CoolInterview.com
Answered by: Nongban | Date: 1/21/2008
| Contact Nongban
To store images in Sql Database you need to set the field to image in sql server then you have to convert image to binary and then save to database location. Source: CoolInterview.com
Answered by: Pandurang Pable | Date: 3/9/2008
| Contact Pandurang Pable
In vb.net, the images can be stored into database in the form of ByteArray.At the time of retrieving,we can assign the byteArray to MemoryStream and then convert into image. Source: CoolInterview.com
Answered by: SoumyaLaxmi | Date: 2/23/2010
| Contact SoumyaLaxmi
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|