Load an Image from DB to RAM?

  • Thread starter Thread starter pnp
  • Start date Start date
P

pnp

How can I load a blob of an image from an SQL server to an object in RAM
instead of outputting to a file, and then loading it?
 
If you use the SqlClient class and the proper SqlDbType for the parameter,
you can simply use the DataAdapter.Fill method and stick the result into a
DataSet.

You can pull out the image in that row / column by casting it to a byte
array
(byte[]).
 
Back
Top