Server Error

juzmorons

New member
Joined
Jul 10, 2003
Messages
2
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()


Ive encounted the above problem. Can anyone help solve it? Help appreciated.
 
It says the database db1 is opened exclusively by another user. Maybe you have the file open in Access and youre trying to open it using code now? Thats the usual way to get that message.

Try closing Access while you run your code.

-Ner
 
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.
 
Back
Top