Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    12

    Unanswered: Insert Document to a Record

    Hi

    I have a database that is used to log system faults and is a very simple database. One thing we often need from the system users, is a screen shot to help us determine the fault. The users update a record by using a form we have built, but is it at all possible for them to attach a document to the entry in the table?

    The documents provided can often be Word, Excel, JPEG etc and if they are able to attached it to the record, would it be able to appear as an icon? Linking to a document is not an option due to right access to severs and folders!! To make life easy for the users, I was hoping this could be achieved simply by pressing a button and a dialog box appearing for them to navigate to the file, and hit insert...

    Could any please advise if this is possible, and how it can be achieved?
    Cheers.....Pitz

    (Using Access 2000 on Windows 2000 Professional)

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    You can either link to the document or file with a path and filename or you can embed the object itself in the DB as an Ole Object ... If you do the latter, you have a bit of extraction to do (save it to a file outside of the DB and name it) and then operate on it with the appropriate application (file type dependent) ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Without getting into thick code, you could add an OLE field to the table and have the use paste the screen shot directly into that control. It'll be a resource and space hog tho.

    The ideal way is to decode the attached file into raw binary as save it as a binary string. Then, when you want to view it, recreate the file in the temp directory and use the shell to open it (Windows will identify the correct parent application for you if it is registered). This is fairly fast, and very efficient. It also requires a lot of coding, although all the pieces are in this forum.

    As for the icon, you'd have to do that manually through code - there isn't a built in function that will do that for you that i am aware of.

    Medium path is to take the document the user provides and create a copy in your secure area and link to that copy. When you want to view a file, prompt the user for a file name and copy the file from your secure location to the file the user specified. They never see your secure server!

    Good luck,
    tc

  4. #4
    Join Date
    Jul 2004
    Posts
    12
    Thank you both for you suggestions... I will go and have a play around!!
    Cheers.....Pitz

    (Using Access 2000 on Windows 2000 Professional)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •