Home All Groups Group Topic Archive Search About

Openning Access DB throuhg system.diagnostics.process.start

Author
18 Sep 2006 8:18 PM
necroscepter
I am trying to open a MS Access Front end through my windows form app.
It opens fine when the file doesn't need a password.

System.Diagnostics.Process.Start("C:\DBFrontEnds\Employee.mdb")

Is there a way I can pass the password to Access in this case?  I have
looked into the startprocessInfo but I am not sure if thats the right
direction to head in.  Any help or suggestions are much appreciated.

Author
22 Sep 2006 7:12 AM
Dmytro Lapshyn [MVP]
Hi,

This KB article describes the MS Access command line switches (they, in
particular, allow you to specify the user name and password):

http://support.microsoft.com/?kbid=209207

The MSDN docs on the System.Diagnostics.Process class should explain how to
pass command-line args to the process being started. However, you might be
required to start the MS Access executable as the process, specifying the
database name as one of the command-line args.

--
Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL


<necroscep***@gmail.com> wrote in message
Show quote
news:1158610695.414837.126190@k70g2000cwa.googlegroups.com...
>I am trying to open a MS Access Front end through my windows form app.
> It opens fine when the file doesn't need a password.
>
> System.Diagnostics.Process.Start("C:\DBFrontEnds\Employee.mdb")
>
> Is there a way I can pass the password to Access in this case?  I have
> looked into the startprocessInfo but I am not sure if thats the right
> direction to head in.  Any help or suggestions are much appreciated.
>

AddThis Social Bookmark Button