Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing and retrieving pdf files

Status
Not open for further replies.

cricketer1

Technical User
Mar 15, 2001
76
US
I have many pdf files which are to be stored in the database or the OS filesystem, but need to be accessed quickly by front end application. Is it possible to store pdf data in SQL Server or will the OS filesystem be a better option and how can I give fast access to this pdf data.

Thanks
Cricketer1
 
You can store any binary file such as pdf, jpg, doc, etc in a SQL Server field with the data type of image.

I would however recommend storing the files on the web servers hard drive, and only storing the relative path to the file in the SQL Server. This will keep the disk load on the SQL Server low, as well as not pound on the SQL Server's memory. Let the web server store and display the files, since that's what it's designed to do.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
It also makes it easier to hack.

Webservers file systems have a good reputation for being compromised.

But yes it is easy to store things there. The webserver does support options like caching and load ballencing.

However if you are looking for "How" to do it from the db side check out the post on the same topic in this forum about 4 days ago. All the code you need is there.. you would just point to the ShowDoc.aspx file in the same way you reference and use the pdf doc.

For what it is worth.

Rob
 
Thanks NoCoolHandle...I have checked out the code in the old thread and it's pretty neat.

and thanks mrdenny, I will evaluate both options and see which one works better for me..

cricketer1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top