Server Error in '/Access' Application

G

Guest

I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and
dropped an .mdb there.

I dragged a DetailView to the form, configured it to show two fields of a
table, and got AccessDataSource1.

The test query worked. The .mdb was not open in Access, nor was it being
used anywhere else.

Yet when I pressed Cntl+F5 I got the following error:

Can somebody tell me what I did wrong?

dennist685
Server Error in '/Access' Applicatio
--------------------------------------------------------------------------------

Could not use ''; file already in use.
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: Could not use ''; file
already in use.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection) +1054849

System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject) +53

System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770

System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +74
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 
S

Steven Cheng[MSFT]

Hey Dennist,

WElcome to ASPNET newgroup.
Seems you're encountering some problems when try using the Access DataBase
in asp.net 2.0 web page? Are you using the AccessDataSource control or
SqlDataSource control(with OleDb provider...)? Based on my local test, I
can correctly using a simple mdb file through both the two DataSource
controls without any error, so I'm thinking this is a file specific
problem. Would you tried creating a new mdb file with a simple table in it
to see whether it works? Also, I'd suggest you view the processes list on
your dev machine through the Manager Task explore to see whether there're
any hidden Processes (like a access process which doesn't show up...) in
it. If anyone exist, you can kill it and test the page again to see whether
it works.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXwMpFiLKdu1UAnQgOnLV4KDmQIfA==
| X-WBNR-Posting-Host: 80.179.14.44
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <[email protected]>
| Subject: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 05:34:02 -0800
| Lines: 81
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360416
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and
| dropped an .mdb there.
|
| I dragged a DetailView to the form, configured it to show two fields of a
| table, and got AccessDataSource1.
|
| The test query worked. The .mdb was not open in Access, nor was it being
| used anywhere else.
|
| Yet when I pressed Cntl+F5 I got the following error:
|
| Can somebody tell me what I did wrong?
|
| dennist685
| Server Error in '/Access' Application
----------------------------------------------------------------------------
----
|
| Could not use ''; file already in use.
| 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: Could not use '';
file
| already in use.
|
| Source Error:
|
| An unhandled exception was generated during the execution of the current
web
| request. Information regarding the origin and location of the exception
can
| be identified using the exception stack trace below.
|
| Stack Trace:
|
|
| [OleDbException (0x80004005): Could not use ''; file already in use.]
| System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
| constr, OleDbConnection connection) +1054849
|
|
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOption
s
| options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection
| owningObject) +53
|
|
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup) +27
|
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
| owningConnection) +47
|
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
| outerConnection, DbConnectionFactory connectionFactory) +105
| System.Data.OleDb.OleDbConnection.Open() +37
| System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
| DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable,
| IDbCommand command, CommandBehavior behavior) +121
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
| Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
| behavior) +137
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83
|
|
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectAr
guments arguments) +1770
|
|
System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSelec
tArguments arguments) +74
| System.Web.UI.DataSourceView.Select(DataSourceSelectArguments
arguments,
| DataSourceViewSelectCallback callback) +17
| System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
| System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
| System.Web.UI.WebControls.DetailsView.DataBind() +4
| System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
| System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181
|
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
| +69
| System.Web.UI.Control.EnsureChildControls() +87
| System.Web.UI.Control.PreRenderRecursiveInternal() +41
| System.Web.UI.Control.PreRenderRecursiveInternal() +161
| System.Web.UI.Control.PreRenderRecursiveInternal() +161
| System.Web.UI.Page.ProcessRequestMain(Boolean
| includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
|
|
|
|
----------------------------------------------------------------------------
 
G

Guest

Thanks, Steve

The funny thing is if I do exactly the same thing putting the ,mdb into
c:/vs2005web/Access, and getting one of the intranet servers the page shows
fine.

I also used nwind.mdb and the same thing happened.

dennist685
 
S

Steven Cheng[MSFT]

Thanks for your quick response Denniest,

Seems also project or envionment specific. Have you tried creating a new
website ( in another directory , also we can try renaming the projecta) and
create some asp.net page to access mdb database to see whether the error
also occur?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXwyQfQS1sulNgiTcGk7GwG48SaWQ==
| X-WBNR-Posting-Host: 192.117.113.41
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 23:31:06 -0800
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360647
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Steve
|
| The funny thing is if I do exactly the same thing putting the ,mdb into
| c:/vs2005web/Access, and getting one of the intranet servers the page
shows
| fine.
|
| I also used nwind.mdb and the same thing happened.
|
| dennist685
|
|
 
G

Guest

Steve, I did exactly what you asked, only using a grid instead of a
detailview. However I got the same error - Exception Details:
System.Data.OleDb.OleDbException: Could not use ''; file already in use.

and the file is not in use. Access isn't open nor any other application
that is using the database by the same name in a folder somewhere else.

dennist685
 
S

Steven Cheng[MSFT]

Hi Dennist,

Thanks for your response.
I've also noticed your another thread titled:

"Can't edit, delete or add row in an Access database in a website...."

so I'm a bit confused on your current status on this issue? Seems you could
correctly get the access database to displaying data and edit /updaing ?

In that thread you mentioned that you've encountered new problem on
deleting.....? Please feel free to let me know if there'is anything I
didn't catch up...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Steven,

If I open the same project in, say, c:\vs2005web\Access, then it shows.
It's only when I put it in inetpub that I get the error.

dennist685
 
S

Steven Cheng[MSFT]

Hey Dennist,

Thanks for your reply. After some further testing in an IIS based web
project ( thought I don't think this is the cause...), I was able to
reproduce the problem you met in some certain condition... And seems
the cause of the problem is VS.NET IDE. I'm not sure whether you've ever
view the access database through the VS.NET IDE's Server Explorer? Based
on my test, if we ever view the data in access mdb file through VS.NET
IDE's server explorer, but didn't close the connection, then at runtime,
the page using that access database will throw the exception indicate that
the mdb file is used by other process. So please have a check in your
VS.NET's server explorer to see whether there is connection to that mdb
file. If so, please select it and choose close the connection or just
delete the connetion and test again to see whether this helps.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXw9bzcNW84Q8jSQzKfOq1Z+ojcng==
| X-WBNR-Posting-Host: 85.64.135.196
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Server Error in '/Access' Application
| Date: Thu, 24 Nov 2005 04:51:07 -0800
| Lines: 6
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360712
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
|
| If I open the same project in, say, c:\vs2005web\Access, then it shows.
| It's only when I put it in inetpub that I get the error.
|
| dennist685
|
 
G

Guest

Actually Steven, in my case its stranger than that.

I tried with two databases. nwind.mdb and hasbara.mdb, which is the mdb I
use in main project. In neither case did they show up on server explorer.
Other instances of hasbara.mdb did, but there were little x's on the bottom
right. I assume that means they were not connected.

If I just allow the user to select the row, in both cases iis didn't object.
But if I allowed the user to edit, add, delete and insert rows, I got the
error I've been complaining about.

dennist685
 
S

Steven Cheng[MSFT]

Hi Dennist,

I've got your repro attachment, I'll perform some tests and continue to
post my response in your followup thread:

Subject: Re: Can't edit, delete or add row in an Access database in a websi
Newsgroups: microsoft.public.dotnet.framework.aspnet

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "dennist685" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: Re: Server Error in '/Access' Application
| Date: Sat, 26 Nov 2005 07:58:42 +0200
| Lines: 1193
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 192.117.113.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:361029
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| | > Actually Steven, in my case its stranger than that.
| >
| > I tried with two databases. nwind.mdb and hasbara.mdb, which is the
mdb I
| > use in main project. In neither case did they show up on server
explorer.
| > Other instances of hasbara.mdb did, but there were little x's on the
| > bottom
| > right. I assume that means they were not connected.
| >
| > If I just allow the user to select the row, in both cases iis didn't
| > object.
| > But if I allowed the user to edit, add, delete and insert rows, I got
the
| > error I've been complaining about.
| >
| > dennist685
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top