Show an image on a web form from MSSQL database

  • Thread starter Thread starter Dmitri Shvetsov
  • Start date Start date
D

Dmitri Shvetsov

Hi,

What's the easiest method to do that? I need to extract an image from Image
type column and then display it. Should I store the image as an image file
on a disk and then assign the image URL to this file? Or there is a easier
way to do that? Does somebody have a source code for that?

Thanks,
Dmitri
 
There are many examples out there on google if you search for BLOB and
ADO.NET. However, I've had to do this on a few occassions, pre ado.net and
with ADO.NET and as a rule, I think storing images, or sound files or many
other large blob files in the DB is not worth the hassle. Storing a path
reference is quite easy and you'll probably see much better access time and
overall server performance. The only real downside is that you need to be
much more careful about permissions to those files if you are opening it up
via the web, but these days security should be taken very seriously
regardless of the environmnet you are dealing with.

HTH,

Bill
 
Back
Top