Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Access database won't open

Reply
Thread Tools

Access database won't open

 
 
Frank Hayward
Guest
Posts: n/a
 
      11-23-2004
Hello.

I have created a database connection to an access database in my web
application. The problem is that I get the following error message, even
though nobody is connected to the database. I have tried a fresh boot,
downloading the latest Jet drivers, disabling the sql server, and moving the
database from c:\inetpub\wwwroot\web... to a spot on my hardrive, but none
of these has worked. I am following an exercise from a book so there is no
chance that I have made a coding error. I have also checked all permissions
and doubt that is the problem.

Please help

Thanks Frank
Server Error in '/web/DataWebTrial' Application.
----------------------------------------------------------------------------
----

The Microsoft Jet database engine cannot open the file 'E:\Documents and
Settings\Frank\My Documents\Visual Studio Projects\DataWebTrial\Data.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 'E:\Documents and Settings\Frank\My
Documents\Visual Studio Projects\DataWebTrial\Data.mdb'. It is already
opened exclusively by another user, or you need permission to view its data.

Source Error:


Line 116: Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnLoad.Click
Line 117: DsEmployee1.Clear()
Line 118: OleDbDataAdapter1.Fill(DsEmployee1)
Line 119: End Sub
Line 120:



Source File: c:\inetpub\wwwroot\web\DataWebTrial\WebForm1.aspx. vb Line:
118

Stack Trace:


[OleDbException (0x80004005): The Microsoft Jet database engine cannot open
the file 'E:\Documents and Settings\Frank\My Documents\Visual Studio
Projects\DataWebTrial\Data.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvid er()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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)
DataWebTrial.WebForm1.btnLoad_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\web\DataWebTrial\WebForm1.aspx. vb:118
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()






----------------------------------------------------------------------------
----

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573


 
Reply With Quote
 
 
 
 
Mary Chipman
Guest
Posts: n/a
 
      11-25-2004
When you attempt to connect to an Access mdb from asp.net, you are not
connecting with *your* permissions on the file system, but with those
of the ASP.NET Machine Account (ASPNET). This is a restricted account
and is determined by the <processModel> section in the Machine.config
file. It affects all ASP.NET applications running on the server by
sandboxing them so that they do not have administrative file access on
the host box. Grant the necessary ACLs to ASPNET on the folders
containing the mdb and mdw files (read, write, delete so the .ldb
files get cleaned up).

--Mary

On Tue, 23 Nov 2004 20:34:50 -0000, "Frank Hayward"
<(E-Mail Removed)> wrote:

>Hello.
>
>I have created a database connection to an access database in my web
>application. The problem is that I get the following error message, even
>though nobody is connected to the database. I have tried a fresh boot,
>downloading the latest Jet drivers, disabling the sql server, and moving the
>database from c:\inetpub\wwwroot\web... to a spot on my hardrive, but none
>of these has worked. I am following an exercise from a book so there is no
>chance that I have made a coding error. I have also checked all permissions
>and doubt that is the problem.
>
>Please help
>
>Thanks Frank
>Server Error in '/web/DataWebTrial' Application.
>----------------------------------------------------------------------------
>----
>
>The Microsoft Jet database engine cannot open the file 'E:\Documents and
>Settings\Frank\My Documents\Visual Studio Projects\DataWebTrial\Data.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 'E:\Documents and Settings\Frank\My
>Documents\Visual Studio Projects\DataWebTrial\Data.mdb'. It is already
>opened exclusively by another user, or you need permission to view its data.
>
>Source Error:
>
>
>Line 116: Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal
>e As System.EventArgs) Handles btnLoad.Click
>Line 117: DsEmployee1.Clear()
>Line 118: OleDbDataAdapter1.Fill(DsEmployee1)
>Line 119: End Sub
>Line 120:
>
>
>
>Source File: c:\inetpub\wwwroot\web\DataWebTrial\WebForm1.aspx. vb Line:
>118
>
>Stack Trace:
>
>
>[OleDbException (0x80004005): The Microsoft Jet database engine cannot open
>the file 'E:\Documents and Settings\Frank\My Documents\Visual Studio
>Projects\DataWebTrial\Data.mdb'. It is already opened exclusively by
>another user, or you need permission to view its data.]
> System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr)
> System.Data.OleDb.OleDbConnection.InitializeProvid er()
> System.Data.OleDb.OleDbConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
>ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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)
> DataWebTrial.WebForm1.btnLoad_Click(Object sender, EventArgs e) in
>c:\inetpub\wwwroot\web\DataWebTrial\WebForm1.aspx .vb:118
> System.Web.UI.WebControls.Button.OnClick(EventArgs e)
>
>System.Web.UI.WebControls.Button.System.Web.UI.IP ostBackEventHandler.RaisePo
>stBackEvent(String eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
>sourceControl, String eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
> System.Web.UI.Page.ProcessRequestMain()
>
>
>
>
>
>
>----------------------------------------------------------------------------
>----
>
>Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
>Version:1.1.4322.573
>


 
Reply With Quote
 
 
 
 
CodeDevil
Guest
Posts: n/a
 
      12-05-2004

I met a problem like that once.

Try closing access and then try to connect to it from your code. If
that doesn't work email me.


got a code problem? hand it to the devil.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
How do I open a database connection on an access file that currently open ? THY ASP .Net 4 08-22-2003 03:50 PM
Re: Software Developer to transcribe Oracle database into Access database Fluker MCSD 0 07-09-2003 01:20 PM
Re: Software Developer to transcribe Oracle database into Access database Guy Cox MCSD 1 07-09-2003 08:07 AM



Advertisments