473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

aspx Error Message

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
1 1694
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
1
by: Jerry Tovar | last post by:
I am using .Net 2003 on a XPPro running IIS. I am unable to view any of my ASPX webforms in a browser unless I modify the .ASPX file and replace Codebehind="employee.aspx.cs" with...
6
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
3
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition...
2
by: Ric | last post by:
im new to asp.net. from what i understand, you have the aspx file (presentation), user-control(ascx file), code-behind(vb file) and components(compiled vb and dll files). the aspx file contains a...
14
by: Mark B | last post by:
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a scheduled hard-boot occurred during a ms-security patch install overnight. They couldn't get the server working again so they...
10
by: bienwell | last post by:
Hi, I have a question about file included in ASP.NET. I have a file that includes all the Sub functions (e.g FileFunct.vb). One of the functions in this file is : Sub TestFunct(ByVal...
7
by: Frankie | last post by:
I just acquired a new customer who had an existing ASP classic Web site. When I took over, I transferred all content to ASPX pages that have different page names than the prior Web site had. I kept...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
4
by: rn5a | last post by:
Using VBC, I compiled a VB class file into a DLL named MyPro.dll. The namespace used in this class file is 'MyPro' & the public class is named 'MyClass'. This is the ASPX page which imports the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.