Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 8th, 2005, 04:51 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Save Images in Sql Db

Hello,

Using ASP Script, I need to store images from my LOCAL PC to online sql server in blob format.

Please advice!!

NOTE:
The images are located on my LOCAL MECHINE.
Image have to be saved in database.


Thank you,
Zeeshan Ahmed
itHighway

Reply With Quote
  #2 (permalink)  
Old August 8th, 2005, 06:06 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;The images are located on my LOCAL MECHINE.
Why dont you upload them to the server and store just the path

;;;Image have to be saved in database
why do you say 'have to be saved'?

I have heard of people doing this but never understood why. Most store the path to the image.

To any one out there - dont they??



Wind is your friend
Matt
Reply With Quote
  #3 (permalink)  
Old August 8th, 2005, 10:09 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

Hi Matt, thanks for you reply. Its my clients requiment. He needs it for security. I know there are other ways to secure files. But he wants it to be secure through db

Reply With Quote
  #4 (permalink)  
Old August 8th, 2005, 10:23 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

The file being the image? Mate, im fairly sure it is not possible to secure an image that is rendered on a web page - doesnt matter where it sits.

;;;he wants it to be secure through db
Interesting. Does he understand directory level security?


Wind is your friend
Matt
Reply With Quote
  #5 (permalink)  
Old August 9th, 2005, 04:12 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

Hi Matt - my client is now agreed to save images path in database. He's something difficult to understand.

Thanks for your time and help!

Reply With Quote
  #6 (permalink)  
Old August 9th, 2005, 06:09 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I am still curious. Who stores images inside the DB, why, what do you achieve. There are so many reason why I think its a bad idea, performance for a start. Does anybody have any experience based knowlege on this one? do you do it? whats your experiences?

Wind is your friend
Matt
Reply With Quote
  #7 (permalink)  
Old August 10th, 2005, 12:49 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

Actually, I was working on a Mortgage application forms where they want high security for their customers data.
When a customer fills online application they scan that application and other documents and store those scaned images into database.


You are right that it effects the performance, but if connections and record set are used properly then it doesnot really effects the performance and results for end user. Plus Hosting Server should be able to handle the pressure as well.

There's a US Govt website (I forgot its name) which holds more then 1 billion images in Sql Server db. I browsed that website with my 56K modem and there was no perfomance problem.

Now, there is another way to save the files and images which is mostly used by websites selling scripts and images. ASPupload component provide a downloadable utility that hides the actual page of downloadable file and user never knows the actual path of file.



Reply With Quote
  #8 (permalink)  
Old August 10th, 2005, 01:07 AM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I dont believe database security is better than dir level security. Especially when think about it like this; the .bak file is stored in a dir somewhere anyhow.

When a file is rendered on a web page its in your cache and becomes available. Hiding a path isnt hard to do but as soon as you render the image it is gettable.

Performance - IMO, Why even run the risk of possible performance problems.

have a good day mate

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
Using SaveFileDialog to save SQL DB file jscammell VB Databases Basics 4 April 14th, 2007 10:02 AM
Save images in Sql Db itHighway SQL Server 2000 5 October 18th, 2006 10:39 AM
display images from DB shs BOOK: Beginning ASP.NET 1.0 11 February 21st, 2006 02:21 AM
how to save images in sql2000 using vb6 vaneza VB How-To 5 August 17th, 2005 03:08 AM



All times are GMT -4. The time now is 05:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.