Reply to topic
Storing Images in MS SQL with ASP.NET
MBMunday


Joined: 06 Apr 2004
Posts: 76
Location: Dallas/Fort Worth
Reply with quote
I recently tackled the task of storing images (not the image paths, but the actual images) in MS SQL Server and ASP.NET for a project at my full-time job. If anyone is interested in seeing the .vb code, feel free to email me at MBMunday@mbmwc.com and I'll forward you the .vb code and SQL Server table structure.

Regards,

MB
Curious...
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 770
Location: Newark, De
Reply with quote
Not meaning to sound rude, but why would one want to store the image rather than the path in an MS SQL database? I've known that SQL had the potential to do this for years (you'd be shocked how many people miss that fact), but I always discounted it as a bad idea for various reasons.
Images
MBMunday


Joined: 06 Apr 2004
Posts: 76
Location: Dallas/Fort Worth
Reply with quote
We researched this for a while before deciding to do it and decided for our application, it was the best route. We were trying to build a very secure application for a Gang Database for my police department on our Intranet and it just gave us another level of security. The laws governing what police departments can and cannot do, and who can see the information is very strict. This way, the ASP.NET creates a temporary file/image to display on the page and it doesn't show a path to the image. We didn't even want some of the intranet developers to have access to the path of the folder that was holding the images. On the other hand, we thought of securing the server and folders that held the images, etc., etc., but instead of locking down this area here and that area there, we can just give access to the desired table using our Microsoft Active Directory "Group" that we created.

Some people say it is a bad idea to store images in the db, while others say it is okay, depending on your application.

It would have been much less of a headache to simply store the path, but it wasn't my decision. Someone else above me (who didn't have to write the application) decided to do it. I was just trying to share my experience if anyone else decided to tackle the task.

MB
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 770
Location: Newark, De
Reply with quote
I didn't mean to question your programming direction, just wanted to know why your app would use that particular approach since I hadn't seen any others do so! Thanks for the insight, it's always nice to hear about different ways of coding.
MBMunday


Joined: 06 Apr 2004
Posts: 76
Location: Dallas/Fort Worth
Reply with quote
No problem...You didn't offend me or anything. Smile Our application was a very rare and unique need.

MB
Tony


Joined: 06 Apr 2004
Posts: 18
Reply with quote
Actually we store a lot of images in our Oracle Database (BLOB). At least in Oracle, the images are scanned documents for financial purposes. It also keeps the security tighter than keeping them on the server directly. Just thought I'd put my 2 cents in.. Which all that its worth..lol

I'm not familiar with Sql Server but I'm an Oracle Database Admin. I know a few Sql Server Database Admins and Developers, I will try to get some answers for you, if possible.

Tony
Storing Images in MS SQL with ASP.NET
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic