Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3841328
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:38:18+00:00 2026-05-19T15:38:18+00:00

I have a table where there is a Photo text field with the name

  • 0

I have a table where there is a “Photo” text field with the name of the file. I also have the actual files in a separate folder. I want to attach those files to the database, and not keep them in a separate folder. So I’ve created a separate “Picture” attachment field. But I don’t know how I can attach those files to this field automatically. Can you give me some directions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:38:18+00:00Added an answer on May 19, 2026 at 3:38 pm

    Attachments are quite different from OLE objects. The first should be compacted and are managed without OLE servers installed on machine. For example, when you add a OLE object to a MS-Access field, this object is transformed in a kind of bitmap, which ought to be very large. In attachment fields, several file formats are automatically compacted on database. Also, you are able to import more than just only one file. In this case, Access does, behind the scenes, relational database model for improving efficiency.

    You should load and save file formats in attachment fields as follows:

    '  Instantiate the parent recordset. 
       Set rsEmployees = db.OpenRecordset("Employees")
    
       '… Code to move to desired employee
    
       ' Activate edit mode.
       rsEmployees.Edit
    
       ' Instantiate the child recordset.
       Set rsPictures = rsEmployees.Fields("Pictures").Value 
    
       ' Add a new attachment.
       rsPictures.AddNew
       rsPictures.Fields("FileData").LoadFromFile "EmpPhoto39392.jpg"
       rsPictures.Update
    
       ' Update the parent record
       rsEmployees.Update
    
    '  Instantiate the parent recordset. 
       Set rsEmployees = db.OpenRecordset("Employees")
    
       '… Code to move to desired employee
    
       ' Instantiate the child recordset.
       Set rsPictures = rsEmployees.Fields("Pictures").Value 
    
       '  Loop through the attachments.
       While Not rsPictures.EOF
    
          '  Save current attachment to disk in the "My Documents" folder.
          rsPictures.Fields("FileData").SaveToFile _
                      "C:\Documents and Settings\Username\My Documents"
          rsPictures.MoveNext
       Wend
    

    for more information, visit http://msdn.microsoft.com/pt-br/library/bb258184%28v=office.12%29.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table where there is a column of type 'text'. I know
I have a MySQL table where there is a 'date_added' (date) field, 'time_added' (time)
Consider i have a registartion table and there is field prefLocationId and it contains
I have an item table where there is a type column. The values here
I have a table in which there are two columns : 1. import type,
I have table with around 70 000 rows. There is 6000 rows that i
I have a dynamically generated table and for each row in the table there
Suppose table 1 Have 1,000,000 rows. In table 2 there are 50,000 rows INPUT
If I have a parent table and a child table where there can be
My table cells have a font-size of 9pt. Within these table cells there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.