Solved

Import Attachments to Existing Table

Posted on 2014-04-05
3
1,070 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server views 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 Access…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now