juzmorons Posted July 10, 2003 Posted July 10, 2003 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. Quote
*Experts* Nerseus Posted July 10, 2003 *Experts* Posted July 10, 2003 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 Quote "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
rufus Posted July 10, 2003 Posted July 10, 2003 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. Quote Rufus
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.