PC Review


Reply
Thread Tools Rate Thread

Cannot open password protected Access DB

 
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
I'm trying to open a password protected DB file using this c# code

string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=db1.mdb; Jet OLEDBatabase Password=andrea";

OleDbConnection conn = new OleDbConnection(connString);
conn.Open();

The DB is located in the debug folder of the application and the
password is andrea
If I open the DB from Microsoft Access it works fine.

Any idea of what I'm doing wrong?

I get an error telling me that the file doesn't exist. If I remove the
password from the DB and the Password intruction from the connection
string it works fine.

Shall I send you the protected DB1.mdb file?

Thanks.
Andrea
 
Reply With Quote
 
 
 
 
Göran Andersson
Guest
Posts: n/a
 
      18th Jan 2009
(E-Mail Removed)am wrote:
> I'm trying to open a password protected DB file using this c# code
>
> string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
> Source=db1.mdb; Jet OLEDBatabase Password=andrea";
>
> OleDbConnection conn = new OleDbConnection(connString);
> conn.Open();
>
> The DB is located in the debug folder of the application and the
> password is andrea
> If I open the DB from Microsoft Access it works fine.
>
> Any idea of what I'm doing wrong?
>
> I get an error telling me that the file doesn't exist. If I remove the
> password from the DB and the Password intruction from the connection
> string it works fine.
>
> Shall I send you the protected DB1.mdb file?
>
> Thanks.
> Andrea


You may need to supply the user name along with the password in the
connection string. The user name is "Admin".

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
Thanks for the suggestion but I'm still experiencing the same problem

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

I'm attaching the DB (password: andrea).
Thanks.
Andrea

On Sun, 18 Jan 2009 12:52:59 +0100, Göran Andersson <(E-Mail Removed)>
wrote:

>(E-Mail Removed) wrote:
>> I'm trying to open a password protected DB file using this c# code
>>
>> string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
>> Source=db1.mdb; Jet OLEDBatabase Password=andrea";
>>
>> OleDbConnection conn = new OleDbConnection(connString);
>> conn.Open();
>>
>> The DB is located in the debug folder of the application and the
>> password is andrea
>> If I open the DB from Microsoft Access it works fine.
>>
>> Any idea of what I'm doing wrong?
>>
>> I get an error telling me that the file doesn't exist. If I remove the
>> password from the DB and the Password intruction from the connection
>> string it works fine.
>>
>> Shall I send you the protected DB1.mdb file?
>>
>> Thanks.
>> Andrea

>
>You may need to supply the user name along with the password in the
>connection string. The user name is "Admin".

 
Reply With Quote
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
Thanks for the suggestion but I'm still experiencing the same problem

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

I'm attaching the DB (password: andrea).
Thanks.
Andrea

On Sun, 18 Jan 2009 12:52:59 +0100, Göran Andersson <(E-Mail Removed)>
wrote:

>(E-Mail Removed) wrote:
>> I'm trying to open a password protected DB file using this c# code
>>
>> string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
>> Source=db1.mdb; Jet OLEDBatabase Password=andrea";
>>
>> OleDbConnection conn = new OleDbConnection(connString);
>> conn.Open();
>>
>> The DB is located in the debug folder of the application and the
>> password is andrea
>> If I open the DB from Microsoft Access it works fine.
>>
>> Any idea of what I'm doing wrong?
>>
>> I get an error telling me that the file doesn't exist. If I remove the
>> password from the DB and the Password intruction from the connection
>> string it works fine.
>>
>> Shall I send you the protected DB1.mdb file?
>>
>> Thanks.
>> Andrea

>
>You may need to supply the user name along with the password in the
>connection string. The user name is "Admin".

 
Reply With Quote
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
Thanks for the suggestion but I'm still experiencing the same problem

I've used:

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

Can I send you the DB to test?

Thanks.
Andrea

On Sun, 18 Jan 2009 12:52:59 +0100, Göran Andersson <(E-Mail Removed)>
wrote:

>(E-Mail Removed) wrote:
>> I'm trying to open a password protected DB file using this c# code
>>
>> string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
>> Source=db1.mdb; Jet OLEDBatabase Password=andrea";
>>
>> OleDbConnection conn = new OleDbConnection(connString);
>> conn.Open();
>>
>> The DB is located in the debug folder of the application and the
>> password is andrea
>> If I open the DB from Microsoft Access it works fine.
>>
>> Any idea of what I'm doing wrong?
>>
>> I get an error telling me that the file doesn't exist. If I remove the
>> password from the DB and the Password intruction from the connection
>> string it works fine.
>>
>> Shall I send you the protected DB1.mdb file?
>>
>> Thanks.
>> Andrea

>
>You may need to supply the user name along with the password in the
>connection string. The user name is "Admin".

 
Reply With Quote
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
Thanks for the suggestion but I'm still experiencing the same problem

I've used:

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

Can I send you the DB to test?

Thanks.
Andrea

On Sun, 18 Jan 2009 12:52:59 +0100, Göran Andersson <(E-Mail Removed)>
wrote:

>(E-Mail Removed) wrote:
>> I'm trying to open a password protected DB file using this c# code
>>
>> string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
>> Source=db1.mdb; Jet OLEDBatabase Password=andrea";
>>
>> OleDbConnection conn = new OleDbConnection(connString);
>> conn.Open();
>>
>> The DB is located in the debug folder of the application and the
>> password is andrea
>> If I open the DB from Microsoft Access it works fine.
>>
>> Any idea of what I'm doing wrong?
>>
>> I get an error telling me that the file doesn't exist. If I remove the
>> password from the DB and the Password intruction from the connection
>> string it works fine.
>>
>> Shall I send you the protected DB1.mdb file?
>>
>> Thanks.
>> Andrea

>
>You may need to supply the user name along with the password in the
>connection string. The user name is "Admin".

 
Reply With Quote
 
Göran Andersson
Guest
Posts: n/a
 
      18th Jan 2009
(E-Mail Removed)am wrote:
> Thanks for the suggestion but I'm still experiencing the same problem
>
> string connString =
> @"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
> ID=Admin;DataSource=db1.mdb";
>
> I'm attaching the DB (password: andrea).
> Thanks.
> Andrea


You don't need to post the same reply four times, I am capable of
reading something that is posted only once.

Try changing "DataSource" to "Data Source".

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
nagar@community.nospam
Guest
Posts: n/a
 
      18th Jan 2009
I'm sorry about the multiple post. I had trouble uploading the test db
and the message was sent many times.
I'm sending you the project (in VS2008) by email. Would you be so kind
to have a look and see why it doesn't work.
I really appreciate that. Thanks so much!
Andrea

On Sun, 18 Jan 2009 17:04:58 +0100, Göran Andersson <(E-Mail Removed)>
wrote:

>(E-Mail Removed) wrote:
>> Thanks for the suggestion but I'm still experiencing the same problem
>>
>> string connString =
>> @"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
>> ID=Admin;DataSource=db1.mdb";
>>
>> I'm attaching the DB (password: andrea).
>> Thanks.
>> Andrea

>
>You don't need to post the same reply four times, I am capable of
>reading something that is posted only once.
>
>Try changing "DataSource" to "Data Source".

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I open a MS Access password-protected database if I have . =?Utf-8?B?U2FtYXJfUmFnYWI=?= Microsoft Access Security 0 18th Mar 2005 08:51 AM
Open Access database(DAO) with password protected Yanto Microsoft Excel Programming 1 22nd Apr 2004 11:40 AM
How to open a password-protected Access database with DAO? Jarek Microsoft Access Queries 1 7th Feb 2004 04:54 PM
open Access DB that is password protected Shin Microsoft Excel Programming 1 20th Nov 2003 12:41 PM
Open password protected Access using ADO Julie Microsoft Access Security 1 18th Nov 2003 10:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 AM.