How to store a file in a SQL field
Posted on 2008-06-16
I have an Access 2003 Front End that connects to a SQL Server 2005 Back End. I need to select documents from a local PC and store them in a table in SQL Server. At a later time, I will retrieve them and reconstitute them on a local PC. The files can be of any type (Excel, Word, Viseo, PowerPoint, etc.). I have no interest in looking at the data inside them, just in storing them and retrieving them.
What type of field would I use in SQL Server, and what code would I use in Access to read in the file and transmit it to SQL Server? Assume I already have the filepath to the document.