Build installer for Access in Visual Studio

Murray Brown
Murray Brown used Ask the Experts™
Is there a way to build a solution for installing a Microsoft Access database . I want to deploy a an .exe file that when double clicked installs the Access solution
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Do you want to create new MS Access dataBase ? In this case, you can use code:
public bool CreateNewAccessDatabase(string fileName)
ADOX.Catalog cat = new ADOX.Catalog();
ADOX.Table table = new ADOX.Table();
//Create the table and it's fields. 
table.Name = "Table1";
    cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + fileName + "; Jet OLEDB:Engine Type=5");
    //Now Close the database
    ADODB.Connection con = cat.ActiveConnection as ADODB.Connection;
    if (con != null)

Open in new window


Else if you want to install program MS Access, you can call installation (exe file with specific path) in your program.

Open in new window

John TsioumprisSoftware & Systems Engineer
Another way i found recently (but i haven't used it yet) is to embed the Ms Access application as a resource to a VS project.
Check this Article at CodeProject that uses this technique :
Most Valuable Expert 2012
Top Expert 2014
The process of "installing" an Access database can be as simple as copying the file to a local folder, or can be much, much more complex. If all you're doing is copying the Access application to another machine, then you could just use a zip file and leave VS out of the equation. If you have to set references, create shortcuts, handle the registry (to create Trusted Locations, for example), then you'd be much better off using a standard Windows Installer (like suggested on your earlier question) to do this.
Distinguished Expert 2017
I use the SamLogic tool

Somehow, I think your time is probably worth more than $99 unless of course this is a training exercise.  In that case, examine some professional tools to see what features they include.
Murray Developer


Thanks very much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial