Home All Groups Group Topic Archive Search About

Exclusive Connection to Access Database

Author
18 Apr 2006 10:24 PM
Debi
Hi,
How do I set the connectionstring to get Exclusive connection to MS Access
database. I want to let the user reset the database password.

Thanks,
Debi

Author
19 Apr 2006 1:25 AM
KeithM
"Debi" wrote:

> Hi,
> How do I set the connectionstring to get Exclusive connection to MS Access
> database. I want to let the user reset the database password.
>
> Thanks,
> Debi

Try this:

Driver={Microsoft Access
Driver(*.mdb)};Dbq=DBFilePath.mdb;Exclusive=1;Uid=admin;Pwd="

I would recommend www.connectionstrings.com for any connection string
questions you may have, they have an exhaustive list of strings to connect to
just about any data source there is.

Hope this helps,

Keith
Author
19 Apr 2006 1:45 AM
Debi
I'm using oledbconnection, the one you have mentioned is for odbc.

Show quote
"KeithM" wrote:

>
>
> "Debi" wrote:
>
> > Hi,
> > How do I set the connectionstring to get Exclusive connection to MS Access
> > database. I want to let the user reset the database password.
> >
> > Thanks,
> > Debi
>
> Try this:
>
> Driver={Microsoft Access
> Driver(*.mdb)};Dbq=DBFilePath.mdb;Exclusive=1;Uid=admin;Pwd="
>
> I would recommend www.connectionstrings.com for any connection string
> questions you may have, they have an exhaustive list of strings to connect to
> just about any data source there is.
>
> Hope this helps,
>
> Keith
Author
19 Apr 2006 2:30 AM
KeithM
It looks like you will need to set the following parameter:

Jet OLEDB:Connection Control = 1.

HTH,

Keith

Show quote
"Debi" wrote:

> I'm using oledbconnection, the one you have mentioned is for odbc.
>
> "KeithM" wrote:
>
> >
> >
> > "Debi" wrote:
> >
> > > Hi,
> > > How do I set the connectionstring to get Exclusive connection to MS Access
> > > database. I want to let the user reset the database password.
> > >
> > > Thanks,
> > > Debi
> >
> > Try this:
> >
> > Driver={Microsoft Access
> > Driver(*.mdb)};Dbq=DBFilePath.mdb;Exclusive=1;Uid=admin;Pwd="
> >
> > I would recommend www.connectionstrings.com for any connection string
> > questions you may have, they have an exhaustive list of strings to connect to
> > just about any data source there is.
> >
> > Hope this helps,
> >
> > Keith
Author
19 Apr 2006 3:30 AM
Debi
Any idea on where to set it? I put that in connection string and it threw an
error. The sample given in microsoft site shows vb code not .net.

Thanks,
Debi

Show quote
"KeithM" wrote:

> It looks like you will need to set the following parameter:
>
> Jet OLEDB:Connection Control = 1.
>
> HTH,
>
> Keith
>
> "Debi" wrote:
>
> > I'm using oledbconnection, the one you have mentioned is for odbc.
> >
> > "KeithM" wrote:
> >
> > >
> > >
> > > "Debi" wrote:
> > >
> > > > Hi,
> > > > How do I set the connectionstring to get Exclusive connection to MS Access
> > > > database. I want to let the user reset the database password.
> > > >
> > > > Thanks,
> > > > Debi
> > >
> > > Try this:
> > >
> > > Driver={Microsoft Access
> > > Driver(*.mdb)};Dbq=DBFilePath.mdb;Exclusive=1;Uid=admin;Pwd="
> > >
> > > I would recommend www.connectionstrings.com for any connection string
> > > questions you may have, they have an exhaustive list of strings to connect to
> > > just about any data source there is.
> > >
> > > Hope this helps,
> > >
> > > Keith
Author
19 Apr 2006 5:01 AM
Cor Ligthert [MVP]
Debi,

> Any idea on where to set it? I put that in connection string and it threw
> an
> error. The sample given in microsoft site shows vb code not .net.
>
I assume that you mean DAO, ADODB or something like that.

Probably the only way to do things as you do now.

Do not forget that ADONET is completely based on a disconnected environment.

I hope this helps,

Cor
Author
19 Apr 2006 3:00 PM
Paul Clement
On Tue, 18 Apr 2006 15:24:01 -0700, Debi <debi@nospam.com> wrote:

¤ Hi,
¤ How do I set the connectionstring to get Exclusive connection to MS Access
¤ database. I want to let the user reset the database password.

Try adding "Mode=Share Exclusive;" to your OLEDB connection string.


Paul
~~~~
Microsoft MVP (Visual Basic)
Author
19 Apr 2006 6:04 PM
Debi
That worked. Thanks a lot Paul.

Show quote
"Paul Clement" wrote:

> On Tue, 18 Apr 2006 15:24:01 -0700, Debi <debi@nospam.com> wrote:
>
> ¤ Hi,
> ¤ How do I set the connectionstring to get Exclusive connection to MS Access
> ¤ database. I want to let the user reset the database password.
>
> Try adding "Mode=Share Exclusive;" to your OLEDB connection string.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>

AddThis Social Bookmark Button