Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie. Password protect Access database via Delphi.

228 views
Skip to first unread message

Trevor

unread,
Aug 9, 2004, 7:01:19 AM8/9/04
to
Hi all;

I have an access database that I'm using, and want to Password protect
it, but still have Delphi able to access it, I'm using a ADOConnect,
with
a connection string.

When I password protect the database within the Access program, I then
can't get the Delphi app to access it. When I put the password on the
database do I need to create a special user and set the passowrd and
have
Delphi do the same, or can I just put a password on Admin.

--
Thanks.
Trevor..
Hugs to all, To those that need them,
and especially to those that don't.
=======================================================
E-Mail: tre...@myaccess.com.au
Personal WebPages: http://home.myaccess.com.au/~dreamb
=======================================================

Glenn Someone

unread,
Aug 9, 2004, 12:35:06 PM8/9/04
to
I'm not sure that Delphi can talk to Access in specific terms, like
it's password. I'm sure there's a way, but there's really not a
"login" facility with Access, since you're accessing a file, and not a
database utility (Oracle, DB2, SQL Server, etc).

When you talk of password protecting within the Access program, you
are encrypting the file itself, which Delphi may or may not be able to
understand. Essentially what an accessing program must do is know the
password and then be able to decrypt it so it can be read. Not the
same as "password protection".

On Mon, 9 Aug 2004 21:01:19 +1000, "Trevor" <tre...@myaccess.com.au>
wrote:

Jeremy Collins

unread,
Aug 9, 2004, 1:56:04 PM8/9/04
to
Trevor wrote:

> Hi all;
>
> I have an access database that I'm using, and want to Password protect
> it, but still have Delphi able to access it, I'm using a ADOConnect,
> with
> a connection string.
>
> When I password protect the database within the Access program, I then
> can't get the Delphi app to access it. When I put the password on the
> database do I need to create a special user and set the passowrd and
> have
> Delphi do the same, or can I just put a password on Admin.

Ignore Glenn's response, it's very simple. There are two ways
to set a password on an Access File - probably the best choice
for you is under Tools > Security > Set Database Password (in
Access). Otherwise you'll have to mess around with system.mdw.

Once you've done that, just include
"Jet OLEDB:Database Password=mypassword;"
in your ADO connection string.

--
jc

Remove the -not from email

Trevor

unread,
Aug 10, 2004, 10:01:36 AM8/10/04
to
Hi and Thanks.
I tried adding the string you suggested but I keep getting message

Microsoft Datalink Error
"Test connection failed, because of an error in initializing provider.
Cannot start you
application. The workgroup information file is missing or opened
exlusively by another user."

My conncection string is..
Provider=Microsoft.Jet.OLEDB.4.0;Password=password;Data
Source=C:\Sales.mdb;Persist Security Info=True

Trevor..

"Jeremy Collins" <jd.co...@ntlworld-not.com> wrote in message
news:UUORc.588$Bo5...@newsfe4-gui.ntli.net...

MikeB

unread,
Aug 10, 2004, 10:34:21 AM8/10/04
to

"Trevor" <tre...@myaccess.com.au> wrote in message
news:4118...@usenet.per.paradox.net.au...

> Hi and Thanks.
> I tried adding the string you suggested but I keep getting message
>
> Microsoft Datalink Error
> "Test connection failed, because of an error in initializing provider.
> Cannot start you
> application. The workgroup information file is missing or opened
> exlusively by another user."
>
> My conncection string is..
> Provider=Microsoft.Jet.OLEDB.4.0;Password=password;Data
> Source=C:\Sales.mdb;Persist Security Info=True

Look more carefully at Jeremy's example...

Jeremy Collins

unread,
Aug 11, 2004, 4:07:45 AM8/11/04
to
Trevor wrote:

> Hi and Thanks.
> I tried adding the string you suggested but I keep getting message
>
> Microsoft Datalink Error
> "Test connection failed, because of an error in initializing provider.
> Cannot start you
> application. The workgroup information file is missing or opened
> exlusively by another user."

You've used a user password, not a database password; I recommended
that you do not do this.

> My conncection string is..
> Provider=Microsoft.Jet.OLEDB.4.0;Password=password;Data
> Source=C:\Sales.mdb;Persist Security Info=True

This is NOT what I suggested.

Trevor

unread,
Aug 15, 2004, 8:17:56 AM8/15/04
to
I just properly re-read your original post on using Database Password not
Password.
Funny what happens when you use the sugested help properly. In other words,
It Works. (But you already knew that.. )

Problem solved.
Thanks Again.


"Jeremy Collins" <jd.co...@ntlworld-not.com> wrote in message

news:ltkSc.97$QR6...@newsfe1-gui.ntli.net...

0 new messages