473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MS ACCess DB openning with password

Hi,

I am trying to open MS Access DB with c# like follows...

OleDbConnection thisConnection = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=" +
@"..\..\hren.mdb;" +
@"User Id=Admin;" +
@"Password=xxxxx123"
);
Error description:
Cannot start your application. The workgroup information file is missing or
opened exclusively by another user.

It does not works. Do you know why? I can tell you that db is not opened by
another user.

Thanks in advance

Nov 16 '05 #1
8 2637
"ablyplus" <ab******@yahoo.com> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
It does not works. Do you know why?


http://www.andreavb.com/forum/viewtopic_3628.html
Nov 16 '05 #2
Thanks, I appreciate your help, but I unfortunately I still do not
understand how it goes.

Thanks again.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...
"ablyplus" <ab******@yahoo.com> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
It does not works. Do you know why?


http://www.andreavb.com/forum/viewtopic_3628.html

Nov 16 '05 #3
"ablyplus" <ab******@yahoo.com> wrote in message
news:Oa**************@TK2MSFTNGP14.phx.gbl...
Thanks, I appreciate your help, but I unfortunately I still do not
understand how it goes.


OK. Access has two "types" of security: a file password (like Word, Excel
etc) and workgroup security which means that the .mdb file was created under
a secure workgroup.

How would you open this Access database from within Access, not through
C#...?
Nov 16 '05 #4
Thanks for answer.

The basic idea is to protect DB and data's from unauthorized access. I have
put password there and now I need to open that within c#.

I have tried to use code showed in previous message. I am not sure what you
exactly mean when saying "How would you open this Access database from
within Access". I am not sure how my data base has created. I have made it
normally within MS Access without any additions.

I would like to give you proper answers but I am not sure how.

Example you send is description of problem what I have, but I am not sure
how I can use it.

Thanks for understanding and help. i beleive you can help me to resolve this
problem. Thanks.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:eS*************@tk2msftngp13.phx.gbl...
"ablyplus" <ab******@yahoo.com> wrote in message
news:Oa**************@TK2MSFTNGP14.phx.gbl...
Thanks, I appreciate your help, but I unfortunately I still do not
understand how it goes.


OK. Access has two "types" of security: a file password (like Word, Excel
etc) and workgroup security which means that the .mdb file was created
under a secure workgroup.

How would you open this Access database from within Access, not through
C#...?

Nov 16 '05 #5
"ablyplus" <ab******@yahoo.com> wrote in message
news:uE**************@TK2MSFTNGP14.phx.gbl...
I have tried to use code showed in previous message. I am not sure what
you exactly mean when saying "How would you open this Access database from
within Access". I am not sure how my data base has created. I have made it
normally within MS Access without any additions.


OK - a priori. You say "I have made it normally within MS Access without any
additions". From that, I deduce that you have a copy of MS Access installed
on your PC. When you start MS Access, are you prompted for a workgroup
username and password i.e. are you working within a secure workgroup or are
you using the default (unsecure) workgroup?

Then, when you open this database from within Access (File, Open etc) are
you prompted for a file password?
Nov 16 '05 #6
Hey there i had the same problems... and i foud a solution.

I have protected my database under access by clicking Tools->Security->Set database password.

Then in c# when i added a new oledbAdapter on my form i made a new connection.

In the DataLink properties dialogbox under the tab All i double clicked Jet OLEDB: Database Password and set my password again there. Then i searched my disk for the file system.mdw and copyed it in /bin/debug or /bin/Release in my project folder. i passed the path by double clicking the Jet OLEDB: System database in the DataLink properties (tab all) dialog box (see text above).
I tested the connection and it worked fine. When initializing your connection (i do that in the constructor method) i added:

string dat = Application.StartupPath+\\MyAccessDatabase.mdw;

string str = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source="+dat+";Jet OLEDB:Database Password=sbvHdpcl; Jet OLEDB:System database="+Application.StartupPath+\\System.mdw;;

myOleDbConnection.ConnectionString = str;

i use the variable dat because my app changes the connection at runtime....

The files MyAccessDatabase.mdb and System.mdw has to be in /bin/debug or /bin/release folded in your project folder.

It works fine for me... i hope i could help u out... and sorry for my english :)

Marko

"ablyplus" <ab******@yahoo.com> je napisal v sporočilo news:u4**************@tk2msftngp13.phx.gbl ...
Hi,

I am trying to open MS Access DB with c# like follows...

OleDbConnection thisConnection = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=" +
@"..\..\hren.mdb;" +
@"User Id=Admin;" +
@"Password=xxxxx123"
);
Error description:
Cannot start your application. The workgroup information file is missing or
opened exclusively by another user.

It does not works. Do you know why? I can tell you that db is not opened by
another user.

Thanks in advance


Nov 16 '05 #7
When I start MS Access I am prompted only for password. There is no question
like workgroup...
And yes, my db is installed locally on my desk top.

Thanks

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
"ablyplus" <ab******@yahoo.com> wrote in message
news:uE**************@TK2MSFTNGP14.phx.gbl...
I have tried to use code showed in previous message. I am not sure what
you exactly mean when saying "How would you open this Access database
from within Access". I am not sure how my data base has created. I have
made it normally within MS Access without any additions.


OK - a priori. You say "I have made it normally within MS Access without
any additions". From that, I deduce that you have a copy of MS Access
installed on your PC. When you start MS Access, are you prompted for a
workgroup username and password i.e. are you working within a secure
workgroup or are you using the default (unsecure) workgroup?

Then, when you open this database from within Access (File, Open etc) are
you prompted for a file password?

Nov 16 '05 #8
THANKS

"Jet OLEDB:Database Password" is key of this problem.

Thanks

Mirko

"Marko ®nidar" <ma**********@triera.net> wrote in message news:ck*********@enews1.newsguy.com...
Hey there i had the same problems... and i foud a solution.

I have protected my database under access by clicking Tools->Security->Set database password.

Then in c# when i added a new oledbAdapter on my form i made a new connection.

In the DataLink properties dialogbox under the tab All i double clicked Jet OLEDB: Database Password and set my password again there. Then i searched my disk for the file system.mdw and copyed it in /bin/debug or /bin/Release in my project folder. i passed the path by double clicking the Jet OLEDB: System database in the DataLink properties (tab all) dialog box (see text above).
I tested the connection and it worked fine. When initializing your connection (i do that in the constructor method) i added:

string dat = Application.StartupPath+\\MyAccessDatabase.mdw;

string str = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source="+dat+";Jet OLEDB:Database Password=sbvHdpcl; Jet OLEDB:System database="+Application.StartupPath+\\System.mdw;;

myOleDbConnection.ConnectionString = str;

i use the variable dat because my app changes the connection at runtime....

The files MyAccessDatabase.mdb and System.mdw has to be in /bin/debug or /bin/release folded in your project folder.

It works fine for me... i hope i could help u out... and sorry for my english :)

Marko

"ablyplus" <ab******@yahoo.com> je napisal v sporočilo news:u4**************@tk2msftngp13.phx.gbl ...
Hi,

I am trying to open MS Access DB with c# like follows...

OleDbConnection thisConnection = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=" +
@"..\..\hren.mdb;" +
@"User Id=Admin;" +
@"Password=xxxxx123"
);
Error description:
Cannot start your application. The workgroup information file is missing or
opened exclusively by another user.

It does not works. Do you know why? I can tell you that db is not opened by
another user.

Thanks in advance


Nov 16 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
2
by: Dug | last post by:
hi, I have a base splitted in a front-end and back-end. the fe is on the local harddrive et the be on the network harddive. My question is: Is there a way to speed up connection or something...
0
by: com | last post by:
MS Access 2000 Password Recoverer 4.2 Screenshot - Soft30.com MS Access 2000 Password Recoverer will display the password to a MS Access database (*.mdb). This program works for MS Access files...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
8
by: ACE FAN | last post by:
Hi, I;m a newbie trying to get through some examples in VS2003. I'm trying to open a small Access database using ADO.NET in an ASP.NET app usinig an oleDBConnection. I get the following error...
8
by: Anekwe | last post by:
I have a form named Main Menu in Access. Instead of openning Access and double click that form to start a session. I would like to have that form start automatically when I double click or open...
0
by: Danny Makus | last post by:
i have developed an application in access and spilit the interfaces from the backed. i would to know how to protect the tables from being accessed anyhowly by un-authorized persons and stoping other...
1
by: mahesh123 | last post by:
Hi, I am using the VB6.0 and for report crystal reports 8.0. the reports are not openning(means its openning but immediately it is closed the report) when we installed the reports in other system....
1
by: igurov | last post by:
Hi, I want to copy access tables to oracle database. Till now I have opened the connections to both of them. Can anyone explain me what are the next steps? Here is the code that I wrote till now:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.