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 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |