Solved

How to store a file in a SQL field

Posted on 2008-06-16
4
307 Views
Last Modified: 2013-11-27
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.
0
Comment
Question by:wsturdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:frankytee
ID: 21798911
why store the files in your sql server? just put them in whatever folders in your server and then put the filepath and file name in  a sql table so you can reference them.
0
 
LVL 1

Author Comment

by:wsturdev
ID: 21802264
In my app, the User composes an email.  He decides whether to include an attachment or not.  The attachment is on his PC.  He selects the attachment document.  It can be in any format (Excel, Word, PowerPoint, PDF, JPEG, MPEG, Text, you name it).

How do I, programmatically within Access, take that document from his PC and move it to the server to a predefined location?

0
 
LVL 19

Accepted Solution

by:
frankytee earned 500 total points
ID: 21811782
0
 
LVL 1

Author Closing Comment

by:wsturdev
ID: 31468496
WOW...  I really am getting too old for this stuff.  My memory is really failing me!  I just cannot wait to retire!

I asked this same question in March of 2007 and got the answer I needed: http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_22440222.html?sfQueryTermInfo=1+function+readfil+strfile+string

I apologize for posting a "duplicate" question.  Your response, however, did lead me to learn something, so for that reason, I am giving you the points.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question