Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store and run binary (.exe) files in Access database

Status
Not open for further replies.

SeadnaS

Programmer
May 30, 2011
214
Hi,

What I would like to do is store a *.exe in an access database and be able to run it from the database. At the moment i'm running an *.exe through Shell() in VBA but the file has been deleted a few times and I've had to replace it. I figure that if i can store and run it from within the database that this would not happen in future.

Is it possible and how could it be implemented?
 
I have done this, but the way I did it was by storing it in a blob field, chunking it out to a temp folder, then calling shell().
In reality, it's probably easier to prevent the file from being deleted than having to store it in binary object field.
--Jim
 
Re jsteph's suggestion - file system access permissions on the folder containing your executable should be able to prevent file deletes or renames.
This is outside the scope of an Access forum, but the appropriate operating system fora here should be able to help.

It is also worth pointing out - the MDB and ACCDB file formats have a maximum file size of 2Gb. This would need to include your blob plus any other data. Depending how big your file is, it may or may not be possible.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top