Convert attachment to ole object (1 Viewer)

zezo2021

Member
Local time
Today, 20:57
Joined
Mar 25, 2021
Messages
381
Hello friends
Can I Convert the attachment to ole object?
Notes
the attachment contains a lot of records
I tried but not work

maybe any developer create VBA or any tricks can help me

Thank you
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,230
are all the attachments same type (ie, images only or pdf only, etc).
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,230
can you post the table with attachment field?
 

zezo2021

Member
Local time
Today, 20:57
Joined
Mar 25, 2021
Messages
381
DB
with attachment
 

Attachments

  • DbAttatchment.accdb
    3.5 MB · Views: 151

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,230
here try this db. run form1 and select your database.
complete all comboboxes and click Convert.
records will be saved to Table1.
note, you need to delete any records in table1 if you want
to start new conversion.
 

Attachments

  • AttachmentToOLE.accdb
    488 KB · Views: 187

zezo2021

Member
Local time
Today, 20:57
Joined
Mar 25, 2021
Messages
381
Hello
This error appears

@arnelgp

I suggest if possible:

use the same ID from the import attachment table so I can review between the old table and the new table

because I can't review by foreign key because I don't find some fk and all data not imported because the above issue and there duplicate in FK
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    16.8 KB · Views: 171
  • Screenshot_2.png
    Screenshot_2.png
    22.4 KB · Views: 196

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,230
try this.
i am confused with your table, how can you linked your table using the PK?
you should use the Parent ID field? anyway you know your db well so do as you wish.
 

Attachments

  • AttachmentToOLE.accdb
    492 KB · Views: 200
Last edited:

zezo2021

Member
Local time
Today, 20:57
Joined
Mar 25, 2021
Messages
381
one error
 

Attachments

  • 1.png
    1.png
    18.1 KB · Views: 150
  • 2.png
    2.png
    28.8 KB · Views: 200

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,230
maybe the file is too big?
can you post the table you are currently converting?
 

zezo2021

Member
Local time
Today, 20:57
Joined
Mar 25, 2021
Messages
381
Hello
@arnelgp

all file is converted from Attachment to ole object


my problem now:

Is the size of the DB


Do you have any solution for compacting the OLE Field to the lowest size?

my plan is:

1- download the file on HD (PDF)
2- Compact the file to minimum quality
3- reattach the file to the field (ole Object) Auto again

or any other solution you prefer


Thank you so much for all your efforts
 

Users who are viewing this thread

Top Bottom