Convert Image OBJECT to Binary Array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can I save an image in the database, without saving it first in the hard disk?

Thanks,
Bruno Rodrigues.
 
Bruno,

You could call the Save method, and pass in a MemoryStream. You can
then extract a byte array from the MemoryStream, and use that as input to
the Object field in your DB.

Hope this helps.
 
Once again, thanks Nicholas.

Nicholas Paldino said:
Bruno,

You could call the Save method, and pass in a MemoryStream. You can
then extract a byte array from the MemoryStream, and use that as input to
the Object field in your DB.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Bruno Rodrigues said:
Hi,

Can I save an image in the database, without saving it first in the hard
disk?

Thanks,
Bruno Rodrigues.
 
Back
Top