By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

aspx Error Message

P: n/a
When the following VB code is executed (code from an aspx page), the
following error message is issued: "Microsoft Access can't open the
database because it is missing, or opened exclusively by another user. "

The Access database is not opened by another so I don't know why it is being
issued.

Any ideas?

VB Code
'Declare Variables
Dim acApp As Microsoft.Office.Interop.Access.Application()
Dim strDir as String
Dim strFile As String

strDir = "C:\myDocs\"
strFile = "ProfitabilityData.mdb"

'Open Access Application
acApp = CreateObject("Access.Application")
acApp.Application.Visible = True
acApp.OpenCurrentDatabase(strDir & strFile, True) '** Error occurs
here **
Full Text of error message:

Microsoft Access can't open the database because it is missing, or opened
exclusively by another user.
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.Runtime.InteropServices.COMException: Microsoft
Access can't open the database because it is missing, or opened exclusively
by another user.

Source Error:

Line 80: acApp = CreateObject("Access.Application")
Line 81: acApp.Application.Visible = True
Line 82: acApp.OpenCurrentDatabase(strDir & strFile, True)
Line 83:
Line 84: 'Read Textfiles into Reserve Database

Source File: C:\Inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb Line: 82

Stack Trace:
[COMException (0x800a1eba): Microsoft Access can't open the database because
it is missing, or opened exclusively by another user.]

Microsoft.Office.Interop.Access.ApplicationClass.O penCurrentDatabase(String
filepath, Boolean Exclusive, String bstrPassword) +0
ReserveDB.WebForm1.btCreateProfitDB_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:82
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1281

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.6018; ASP.NET
Version:1.0.3705.6018
Thanks, Mark
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The most likely scenario is that you have opened the database from your
program and have either forgotton to close the connection or during
debugging it did not get that far in the program before you ended debugging.
In this situation you may have to log off or reboot.

HTH

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
When the following VB code is executed (code from an aspx page), the
following error message is issued: "Microsoft Access can't open the
database because it is missing, or opened exclusively by another user. "

The Access database is not opened by another so I don't know why it is
being
issued.

Any ideas?

VB Code
'Declare Variables
Dim acApp As Microsoft.Office.Interop.Access.Application()
Dim strDir as String
Dim strFile As String

strDir = "C:\myDocs\"
strFile = "ProfitabilityData.mdb"

'Open Access Application
acApp = CreateObject("Access.Application")
acApp.Application.Visible = True
acApp.OpenCurrentDatabase(strDir & strFile, True) '** Error occurs
here **
Full Text of error message:

Microsoft Access can't open the database because it is missing, or opened
exclusively by another user.
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.Runtime.InteropServices.COMException: Microsoft
Access can't open the database because it is missing, or opened
exclusively
by another user.

Source Error:

Line 80: acApp = CreateObject("Access.Application")
Line 81: acApp.Application.Visible = True
Line 82: acApp.OpenCurrentDatabase(strDir & strFile, True)
Line 83:
Line 84: 'Read Textfiles into Reserve Database

Source File: C:\Inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb Line: 82

Stack Trace:
[COMException (0x800a1eba): Microsoft Access can't open the database
because
it is missing, or opened exclusively by another user.]

Microsoft.Office.Interop.Access.ApplicationClass.O penCurrentDatabase(String
filepath, Boolean Exclusive, String bstrPassword) +0
ReserveDB.WebForm1.btCreateProfitDB_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:82
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1281

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.6018;
ASP.NET
Version:1.0.3705.6018
Thanks, Mark

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.