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

Best approach in storing file content

Status
Not open for further replies.

rsg00usa

Programmer
Jun 25, 2002
3
US
I have a databases that stores log file information amongst other things. Along with that information is a path to where the actual log file resides. A colleague of mine suggested storing the file itself in the database as well. Is that a better idea? I would think keeping a pointer to where files contain is more efficient. If not how would you suggest storing it in the database (plain text, blob, ...)?

Thanks,
Scott
 
While it is possible to store a file in SQL Server, the general consensus it to store the path to file, as you have, and let the file system handle storing the file itself. Check out BOL for READTEXT, WRITETEXT and UPDATETEXT for a look at how to store and retrieve large objects. IMHO it is cumbersome and more trouble than it's worth, most of the time.
--Angel
-----------------------------------
SELECT * FROM users WHERE clue > 0
0 row(s) selected
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top