Hi,
Although that approach doesn't scale well at all. The server and the
database cannot change unless the paths of the new servers remain identical,
load balancing may be difficult and there's more room for error since the
data is just being referenced, not stored. Also, security may be an issue.
Truthfully, I don't know that better performance is attainable simply by
storing the attachments on the file system. Storing them in the database
and using the "string" overload for the Attachment constructor may prove to
be faster since there may be less I/O happening, especially if the code
needs to access the database for other data anyway.
--
Dave Sexton
http://davesexton.com/blog
<Fo**********@gmail.comwrote in message
news:11**********************@51g2000cwl.googlegro ups.com...
>I have a table with field of type image which has binary data in it.
data could be of image/doc/text/etc type. I need to send this data as
file attachments in emails. I should read the data, store it in some
temp file and then attach that file?
You'll get better performance ( in this scenario and in general ) if
you leave the files in the file system and then just store the paths in
the database. But this info might not help very much after you've
already got things set up...