1

Quite straight forward really (well i would have thought) I am trying to create a little launcher app in C# that copies the latest version of a access database to the users C Drive and runs it. I have done everything i want except the running it part. What? would have thought that was the easy part.

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "path to the db.accdb";
proc.Start();

Now this kicks off Access ok, but when it opens Access fires an error message "database not attached"

I have tried so many different ways and get the same result.

Further information: On my machine there are two versions of Access, 2016 (Office 16) and a Runtime version which is Office 15.

The runtime version was the most recently installed so it is what is assigned to the file type, which is the desired behaviour.

I havent tried uninstalling the runtime version to see if it works, because its the runtime version i want to use ultimately.

Any help would be greatly appreciated.

  • Possible duplicate of [Opening an MS-Access database from the command line without running any of the startup vba code?](http://stackoverflow.com/questions/16657263/opening-an-ms-access-database-from-the-command-line-without-running-any-of-the-s) – BartoszKP Feb 28 '17 at 07:11

1 Answers1

0

Dont worry, I am an idiot. Error message was coming from my own code in the Autoexec macro of the database.

I think i can sort it out.