Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Server Error in '/omg' Application.

--------------------------------------------------------------------------------

 

The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\lhz\Desktop\db1.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:\Documents and Settings\lhz\Desktop\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

 

Source Error:

 

 

Line 29: {

Line 30: // Put user code to initialize the page here

Line 31: oleDbDataAdapter1.Fill(dataSet11);

Line 32: DataGrid1.DataBind();

Line 33:

 

 

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

 

Stack Trace:

 

 

[OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\lhz\Desktop\db1.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()

System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)

System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

omg.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\omg\webform1.aspx.cs:31

System.Web.UI.Control.OnLoad(EventArgs e)

System.Web.UI.Control.LoadRecursive()

System.Web.UI.Page.ProcessRequestMain()

 

 

I've encounted the above problem. Can anyone help solve it? Help appreciated.

  • *Experts*
Posted

It says the database db1 is opened exclusively by another user. Maybe you have the file open in Access and you're trying to open it using code now? That's the usual way to get that message.

 

Try closing Access while you run your code.

 

-Ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Try closing the datasoucrce and create a new connection after closing and try.

 

Or you didnot close the connection properly, before, when you used the datasource.

Rufus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...