Solved

Import Attachments to Existing Table

Posted on 2014-04-05
3
1,131 Views
Last Modified: 2014-04-05
Hello Experts,

I have an existing table that I need to add attachments from another Access 2010 database.  I need the record ID in the imported attachment records to match the record ID of the existing table.

What occurred here is that this is an Access 2010 Web database and when I was trying to replicate an existing Web Database application I kept getting a SharePoint I/O error, after doing some research I discovered that this was occurring because of an attachment with an illegal character in it's name.  So I just deleted the attachments data column and I was able to publish the web database.

Now I need to add back the attachments I deleted; now since this is occurring client side I should be able to use standard VBA, Macros or whatever to accomplish this so it's not restricted to web type objects which is why I didn't just tag this for Access Services.

Thank you

p.s. It would be preferable to have this solution do each attachment record as a loop or something similar so I can tell where it fails.  This way I could also identify the attachment(s) that were resulting in my original I/O SharePoint issue and then fix them by renaming or deleting just those specific attachments.
0
Comment
Question by:ShadowIT
  • 2
3 Comments
 
LVL 57
ID: 39980043
Not quite sure I understand what your trying to do, but see if this gets you started:

How to: Work With Attachments In DAO
http://msdn.microsoft.com/en-us/library/office/ff835669%28v=office.14%29.aspx

at the bottom, it show how to loop on the file data and save to disk.   At the top, how to load from a file.

So this would allow you to move the data from one DB to another.

Jim.
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39980046
Here's a link to one of the Access MVP sites that has a good demo on working with Attachment fields:

http://www.accessmvp.com/thedbguy/demos.asp

Jim.
0
 

Author Closing Comment

by:ShadowIT
ID: 39980671
That's exactly what I was looking for...thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 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