in reply to Inserting file into a database

Your question may be interpreted two ways:
  1. You want to store a file in Access in a field
  2. You want to load a file into a table as records of that table

For option one, i'm not really sure how to do it in Access, however its pretty damn easy with oracle. (one way is to unpack your file (if it is binary) to hex, then store it in a CLOB).

For option two, Access has some pretty sophisticated filters that will allow the importing of files into a table... couple that with some of the VB "magic" you have there, and you can easily put a file into Access (altho' i think this is the wrong forum for that.)

Replies are listed 'Best First'.
Re: Re: Inserting file into a database
by osama (Scribe) on Jan 09, 2003 at 22:01 UTC

    About your oracle solution, why would you want to unpack and store in a clob... I would directly store the binary data in a blob... (even if i wanted to store it in a text format, i'd probably prefer to use base64, not base 16:hex )

    I really cannot imagine having the data take twice it's real size (hex<=>binary).

      The 1st thing i tried was a CLOB, it worked, so i kept the solution in place (i was in a rush). I've never retrieved binary data using the DBI, so wasnt sure it would work, or how easy it would be.

      With the infrastructure in place the application performed within acceptable parameters, so I never bothered researching it further. Lazy? you bet... :-)