Cant Connect to Data base

L

Lian

Hi every body
I have a problem with accesses and visual studio. I've just installed
XP and I can't get a connection with the Data base. I have this error
and I don't know how to fix it

The Microsoft Jet database engine cannot open the file
'C:\Inetpub\wwwroot\Manufactor\DBManufactor\dbmanufactor.mdb'. It is
already opened exclusively by another user, or you need permission to
view its data.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet
database engine cannot open the file
'C:\Inetpub\wwwroot\Manufactor\DBManufactor\dbmanufactor.mdb'. It is
already opened exclusively by another user, or you need permission to
view its data.

Source Error:

Line 29: private void Page_Load(object sender, System.EventArgs e)
Line 30: {
Line 31: this.oleDbConnection1 .Open ();
Line 32: this.oleDbDataMainAdapter .Fill (this.dataSetPlayers1 );
Line 33: this.oleDbConnection1 .Close ();

Source File: c:\inetpub\wwwroot\manufactor\webform1.aspx.cs Line:
31

Stack Trace:

[OleDbException (0x80004005): The Microsoft Jet database engine cannot
open the file 'C:\Inetpub\wwwroot\Manufactor\DBManufactor\dbmanufactor.mdb'.
It is already opened exclusively by another user, or you need
permission to view its data.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
Manufactor.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\manufactor\webform1.aspx.cs:31
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 
B

Bradley1234

If you create the database in the design page with the tools tab, you can
manually setup and test the database?

If you make a new dataConnector, click on properties and click on the
properties DataSource, then click on the add project data source wizard?

It should give you the chance to examine all the settings. The blank
password is advised, but databases tend to lock you out to protect the data
integrity.

Are you trying to open the database, copy to a new database that you operate
on, then close the database? And operate on the copy?

Do you need to make changes or can it be read only? Usually Ive found it
helps to allow all changes to be discarded by dumping the copy, and make
several warning buttons before the main database is changed
 
L

Liran By

Thank you for your answer but fortunately I've tried all of those things
and it didn't work. How do I open the data base for more then one user?
when i open the accesses a copy temp file appears with alock on the
icon. how do i unlock it?
 
B

Bradley1234

Ok, maybe its just wording here, but is your program going to modify any
database records? I mean, can you open read only?

When designing, I typically create dummy databases with known values at
specific locations so that no real data is lost

Your program should be able to operate on a new database you just created.
If you make a new db will you get the "already in use" error?

Do you run Microsoft Access ? Is it open? Does it have your database open?
If so, make sure Access closes the database because Ive had the "unable to
access db" if Access has it open

I dont know what you mean by "open the accesses a copy temp file"
 
L

Liran By

Hi

I am getting desperate .I will try to be more clear. When I'm opening
the access in the same folder another file is opening also. The icon is
the same as the icon of access but with one difference. It has a lock on
it and I think it causes the problem. Do you know how to unlock this
file?
 
A

Anne Nolan

When you open a Jet ("Access") database, a file with the same name as the
MDB file is created, but with extension LDB. This is normal, and its
purpose is to keep track of who's in the database.

Whatever you are doing to open the database the first time is apparently
opening in in "exclusive" mode, which is why you get that message. But, the
LDB file is not the source of the problem.

Anne
 
B

Bradley1234

Hi Liran,

When you say "Access" ?? This has 2 meanings when talking about databases
and I dont know which one you are saying. Microsoft Access is a well known
application progam; but the word access means to get at something, like a
database; So you might say
"MS Access" and thats what Im assuming you mean here.

1. You have MS Access running and double click on the database file icon
you want to use, it has the MS Access style icon.
2. It opens, but creates another icon, which adds a "lock" picture, okay
Ill try something with my MS Access, hold on...

Ok, when I do this, it gets a second icon that shows who opened the file.
Im guessing that Access automatically opens a database as tight as it gets,
meaning total lock.

If youre coding in C# with a database *.mdb? and MS Access opens it first?
Its going to be locked out. (I think) Could your question be how to have MS
Access AND your C# program use a database at the same time??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top