After I set the password for MS Access DB , i modify the connection string
from

connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=System.Environment.SystemDirectory\" & "MyDBName.MDB"

to

connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=System.Environment.SystemDirectory\" & "MyDBName.MDB" & ";User
Id=admin;Password= " & "MyPassWord" & ";"


Afterward I open the Access DB, it return error
"cannot start your application. the workgroup information file is missing or
opened exclusively by another user."

Any idea? thanks.

Peter

Re: Connect to a password protected MS Access DB by Miha

Miha
Tue Oct 25 01:51:13 CDT 2005

Hi Peter,

Try this string instead:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:Database Password=MyDbPassword;"
(taken from www.connectionstrings.com)

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Peter" <zlxmqyt@sina.com> wrote in message
news:OFkuTkS2FHA.1140@tk2msftngp13.phx.gbl...
> After I set the password for MS Access DB , i modify the connection string
> from
>
> connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data
> Source=System.Environment.SystemDirectory\" & "MyDBName.MDB"
>
> to
>
> connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data
> Source=System.Environment.SystemDirectory\" & "MyDBName.MDB" & ";User
> Id=admin;Password= " & "MyPassWord" & ";"
>
>
> Afterward I open the Access DB, it return error
> "cannot start your application. the workgroup information file is missing
> or
> opened exclusively by another user."
>
> Any idea? thanks.
>
> Peter
>
>



Re: Connect to a password protected MS Access DB by Peter

Peter
Tue Oct 25 03:29:29 CDT 2005

It really works!!! thank you Miha.

Peter