Copy attachement fields

Victor Zugadi
Victor Zugadi used Ask the Experts™
on
I have a students table with somme attachement type fields (student pic); i need to select somme students from students table an copy then into another database in the students table, insert into select, sql query doesn't work because the attachement field, i really don't know how to copy thie attachaments fields with vba code
thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
copy first the records without the attachment.
then, save the attachment to a drive (Save an Attachment to Disk), then add attachment by LoadFromFile method
see this link https://msdn.microsoft.com/en-us/library/bb258184.aspx
John TsioumprisSoftware & Systems Engineer
Commented:
The Fields that contain normal data are Inserted normally as you do...The Attachments should be inserted as Blobs...check this EE Answer
John TsioumprisSoftware & Systems Engineer

Commented:
Sufficient solutions provided

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial