Connecting Tech Pros Worldwide Forums | Help | Site Map

Storing and extracting binary files in Access

Dave
Guest
 
Posts: n/a
#1: Feb 17 '06
Hello,

I am wondering about including binary files in my MS Access database
application. I want to keep my application as just a single MDE or MDB
file, but the users of the app may need some additional files. One file
is an ODBC driver for connecting to an external database, this is a 120
kb DLL. The other is a 20 kb PDF help document for using the database
application. I am wondering if it is possible to store these files
within the database and programattically write them to some directory
on disk when the user clicks a button on a form.

Thanks for any advice,
Dave


Anthony England
Guest
 
Posts: n/a
#2: Feb 17 '06

re: Storing and extracting binary files in Access


"Dave" <davidclark@mail.com> wrote in message
news:1140168447.626079.118090@g47g2000cwa.googlegr oups.com...[color=blue]
> Hello,
>
> I am wondering about including binary files in my MS Access database
> application. I want to keep my application as just a single MDE or MDB
> file, but the users of the app may need some additional files. One file
> is an ODBC driver for connecting to an external database, this is a 120
> kb DLL. The other is a 20 kb PDF help document for using the database
> application. I am wondering if it is possible to store these files
> within the database and programattically write them to some directory
> on disk when the user clicks a button on a form.
>
> Thanks for any advice,
> Dave[/color]


You could store such a file as a binary large object bitmap (BLOB) where the
whole data for the file is stored in the field of a table. See
http://support.microsoft.com/?kbid=210486 for more.
In fact, you could even store the file data in a code module, where the data
is held as a series of ascii strings representing the binary data which is
then written out to a file. This approach is less standard and you would
need to write a routine which would read the file data and then effectively
write the vba for you. I've done it like this before, but perhaps the first
idea is easier to recommend.


Closed Thread