Solved

How to store a file in a SQL field

Posted on 2008-06-16
4
315 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

695 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