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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to store a file in a database?

Status
Not open for further replies.

dejanv

Programmer
Joined
Oct 9, 2002
Messages
4
Location
MK
I have SQL Server 2000 and I have to make a table for storing Word, Excel or maybe some other Microsoft Office files. What data type should I use for this? Can I search through the stored files by words in a stored documents using a query and how?
 
To store files you can use the image data type, which holds binary data. Because you're storing the actual binary file, you can't then search through the text of the document.

Another option is to store the files in a certain folder on the hard drive and use a varchar field in the DB to just store the path/filename.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top