Board index » delphi » Password issue in ADO & MS Access2000 Database

Password issue in ADO & MS Access2000 Database

Password issue in ADO & MS Access2000 Database

Normally my Delphi5 with Ms access2000 database(ela.mdb) connects perfectly
by ADOconnection. BUT, if I set "Password" from Access (by opening it as an
exclusive method!), my ADO denies to connect it!!

I really have to put Password in my database. Is there any other way to do
that? Can I set password from my Delphi app?? if so.. pleas pleas HELP me.

f a i s a l
k...@bdonline.com

 

Re:Password issue in ADO & MS Access2000 Database


Quote
>I really have to put Password in my database. Is there any other way to do
>that? Can I set password from my Delphi app?? if so.. pleas pleas HELP me.

My guess is that you are setting a database password.
to enter the database password go to the All Tab in the datalink Properties
dialogbox

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Password issue in ADO & MS Access2000 Database


thanks that worked when i removed the password from MSAccess.. now my ADO
can connect to that database...and i can set password through ADO... BUT
that dosen't lock my  database! i can stll open it from MSAccess!! Why? and
how can i protect my MSAccess database?
f a i s a l
k...@bdonline.com
f a i s a l <k...@bdonline.com> wrote in message news:3a9fb708_1@dnews...
Quote
> Password issue in ADO & MS Access2000 Database

> Normally my Delphi5 with Ms access2000 database(ela.mdb) connects
perfectly
> by ADOconnection. BUT, if I set "Password" from Access (by opening it as
an
> exclusive method!), my ADO denies to connect it!!

> I really have to put Password in my database. Is there any other way to do
> that? Can I set password from my Delphi app?? if so.. pleas pleas HELP me.

> f a i s a l
> k...@bdonline.com

Re:Password issue in ADO & MS Access2000 Database


Quote
>thanks that worked when i removed the password from MSAccess.. now my ADO
>can connect to that database...and i can set password through ADO... BUT
>that dosen't lock my  database! i can stll open it from MSAccess!! Why? and
>how can i protect my MSAccess database?

A database password does not restrict access to the database when you provide
the proper password.  Look for connection properties to open the database in
single user mode if that is what you are looking for.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Password issue in ADO & MS Access2000 Database


No, basicaly what i want to do is protect my database from using by other
software (access)
it's not a single/multi user problem.

what should i do?

Brian Bushay TeamB <BBus...@Nmpls.com> wrote in message
news:dho4at0dnnce36t55evgivbkf99m1jej8k@4ax.com...

Quote

> >thanks that worked when i removed the password from MSAccess.. now my ADO
> >can connect to that database...and i can set password through ADO... BUT
> >that dosen't lock my  database! i can stll open it from MSAccess!! Why?
and
> >how can i protect my MSAccess database?

> A database password does not restrict access to the database when you
provide
> the proper password.  Look for connection properties to open the database
in
> single user mode if that is what you are looking for.

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Password issue in ADO & MS Access2000 Database


Hi faisal,

Quote
> No, basicaly what i want to do is protect my database from using by
other
> software (access)
> it's not a single/multi user problem.

Then I don't understand why you removed the password you set in Access.

If you set a database password in Access, only those knowing the password
will be able to connect.
And if you set that same password in the connection string as Brian
explained, users of your ADO application will not need to provide it
because it will be build into the connection string. And if you have set
LoginPrompt to false in the properties of the ADOConnection, then won't
even see the dialog box.

The connection string can not set a database password, it can just stock
its value in order for the user to connect without having to type it.

In order to set a database password from ADO you must use JRO, but I don't
think it would be useful in your case, if you can set it in Access.

Thrse

Re:Password issue in ADO & MS Access2000 Database


Then i am back to where i've started.... if i set password from MSAccess...
i can't make my connection!!
what to do man???
Quote
Thrse Hanquet <therese.hanq...@skynet.be> wrote in message

news:3aa2a3ac_2@dnews...
Quote
> Hi faisal,

> > No, basicaly what i want to do is protect my database from using by
> other
> > software (access)
> > it's not a single/multi user problem.

> Then I don't understand why you removed the password you set in Access.

> If you set a database password in Access, only those knowing the password
> will be able to connect.

> And if you set that same password in the connection string as Brian
> explained, users of your ADO application will not need to provide it
> because it will be build into the connection string. And if you have set
> LoginPrompt to false in the properties of the ADOConnection, then won't
> even see the dialog box.

> The connection string can not set a database password, it can just stock
> its value in order for the user to connect without having to type it.

> In order to set a database password from ADO you must use JRO, but I don't
> think it would be useful in your case, if you can set it in Access.

> Thrse

Re:Password issue in ADO & MS Access2000 Database


Hi faisal,

Quote
> Then i am back to where i've started.... if i set password from
MSAccess...
> i can't make my connection!!

Even when you build the password in the ADOConnection?
I have a database with a password set in Access and there is no problem to
access it through ADO as long as the connection string contains the
password.
What do you get as error message when you try to connect?

Thrse

Re:Password issue in ADO & MS Access2000 Database


Hi Thrse,

This can be confusing at first. When you use the ado connection string
builder there is a position for entering a user name and password on the
"Connection" page of the dialog. If you try to enter the password for your
Access database here it does NOT work. You can check this by looking at the
generated connection string, when you will see that no password has been
inserted into the connection string.

What you need to do select the Jet 4.0 provider and then go to the "All"
page and enter the Access password in the row containing "JET OLEDB:Database
Password". This should work.

Graham
Prism Communications.

Quote
>Thrse Hanquet <therese.hanq...@skynet.be> wrote in message

news:3aa3d607_1@dnews...
Quote
> Hi faisal,

> > Then i am back to where i've started.... if i set password from
> MSAccess...
> > i can't make my connection!!

> Even when you build the password in the ADOConnection?
> I have a database with a password set in Access and there is no problem to
> access it through ADO as long as the connection string contains the
> password.
> What do you get as error message when you try to connect?

> Thrse

Re:Password issue in ADO & MS Access2000 Database


Quote
>This can be confusing at first. When you use the ado connection string
>builder there is a position for entering a user name and password on the
>"Connection" page of the dialog. If you try to enter the password for your
>Access database here it does NOT work. You can check this by looking at the
>generated connection string, when you will see that no password has been
>inserted into the connection string.

>What you need to do select the Jet 4.0 provider and then go to the "All"
>page and enter the Access password in the row containing "JET OLEDB:Database
>Password". This should work.

Your advise is not correct.  First Database password is not the same as
Password.  Usename and Password correspond to the user level security you put on
an Access database,  database password corresponds to the option
|Tools|Database|Set database password'

Second you can include the password in your connection string if you check the
"Allow saving Password" in the connection dialog box.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Password issue in ADO & MS Access2000 Database


Ok...tell me when yo set password in MSAccess... how do you set an username
for that?
because in access... Tools|Security|Set Database password... gives you a
chance to set only Password.
Quote
Thrse Hanquet <therese.hanq...@skynet.be> wrote in message

news:3aa3d607_1@dnews...
Quote
> Hi faisal,

> > Then i am back to where i've started.... if i set password from
> MSAccess...
> > i can't make my connection!!

> Even when you build the password in the ADOConnection?
> I have a database with a password set in Access and there is no problem to
> access it through ADO as long as the connection string contains the
> password.
> What do you get as error message when you try to connect?

> Thrse

Re:Password issue in ADO & MS Access2000 Database


Just tell me some thing...(this might be stupid) when i set Password & User
name in ADO "All" page, does it saves in the connection? or inside the
Database (*.mdb) itself?
faisal
Quote
Graham Plain <grahampl...@prismcomms.freeserve.co.uk> wrote in message

news:3aa4097c_1@dnews...
Quote
> Hi Thrse,

> This can be confusing at first. When you use the ado connection string
> builder there is a position for entering a user name and password on the
> "Connection" page of the dialog. If you try to enter the password for your
> Access database here it does NOT work. You can check this by looking at
the
> generated connection string, when you will see that no password has been
> inserted into the connection string.

> What you need to do select the Jet 4.0 provider and then go to the "All"
> page and enter the Access password in the row containing "JET
OLEDB:Database
> Password". This should work.

> Graham
> Prism Communications.

> >Thrse Hanquet <therese.hanq...@skynet.be> wrote in message
> news:3aa3d607_1@dnews...
> > Hi faisal,

> > > Then i am back to where i've started.... if i set password from
> > MSAccess...
> > > i can't make my connection!!

> > Even when you build the password in the ADOConnection?
> > I have a database with a password set in Access and there is no problem
to
> > access it through ADO as long as the connection string contains the
> > password.
> > What do you get as error message when you try to connect?

> > Thrse

Re:Password issue in ADO & MS Access2000 Database


Hi faisal,

Quote
> Ok...tell me when yo set password in MSAccess... how do you set an
username
> for that?

Database password and passwords for individual users are two very
different things. They are not set in the same way in Access, and they are
not set in the same way in ADOConnection.

Quote
> because in access... Tools|Security|Set Database password... gives you a
> chance to set only Password.

This sets database password which applies to all users. Any user knowing
that password can connect to the database. As others explained, this is
what you can set in the connection string for the property "JET
OLEDB:Database Password".

If you want to set user password in Access, you select also
Tools|Security, but inside that something like "Managing users and groups"
(sorry my version is French). There you can set, modify or delete the
password for each user you define.

Thrse

Re:Password issue in ADO & MS Access2000 Database


Hi faisal,

Quote
> Ok...tell me when yo set password in MSAccess... how do you set an
username
> for that?

Database password and passwords for individual users are two very
different things. They are not set in the same way in Access, and they are
not set in the same way in ADOConnection.

Quote
> because in access... Tools|Security|Set Database password... gives you a
> chance to set only Password.

This sets database password which applies to all users. Any user knowing
that password can connect to the database. As others explained, this is
what you can set in the connection string for the property "JET
OLEDB:Database Password".

If you want to set user password in Access, you select also
Tools|Security, but inside that something like "Managing users and groups"
(sorry my version is French). There you can set, modify or delete the
password for each user.

Thrse

Re:Password issue in ADO & MS Access2000 Database


Hi

Use the connection string (say the password is 12345) like:

"Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=12345;Persist
Security Info=False;Data Source=c:\...\...etc"

.............................................
Zarko Gajic, BSCS
About Guide to Delphi Programming
http://delphi.about.com
email: delphi.gu...@about.com
free newsletter: http://delphi.about.com/library/blnewsletter.htm
forum: http://forums.about.com/ab-delphi/start/
.............................................

"f a i s a l" <k...@bdonline.com> wrote in message news:3a9fb708_1@dnews...

Quote
> Password issue in ADO & MS Access2000 Database

> Normally my Delphi5 with Ms access2000 database(ela.mdb) connects
perfectly
> by ADOconnection. BUT, if I set "Password" from Access (by opening it as
an
> exclusive method!), my ADO denies to connect it!!

> I really have to put Password in my database. Is there any other way to do
> that? Can I set password from my Delphi app?? if so.. pleas pleas HELP me.

> f a i s a l
> k...@bdonline.com

Go to page: [1] [2]

Other Threads