• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1297
  • Last Modified:

Import Attachments to Existing Table

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
ShadowIT
Asked:
ShadowIT
  • 2
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
ShadowITAuthor Commented:
That's exactly what I was looking for...thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now