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

Server Error in '/Access' Application

P: n/a
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(Ol eDbConnectionString
constr, OleDbConnection connection) +1054849

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

System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.Execut eSelect(DataSourceSelectArguments arguments) +1770

System.Web.UI.WebControls.AccessDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments) +74
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +181
System.Web.UI.WebControls.CompositeDataBoundContro l.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


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
Nov 23 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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==?=" <de********@newsgroup.nospam>
| Subject: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 05:34:02 -0800
| Lines: 81
| Message-ID: <C3**********************************@microsoft.co m>
| 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!TK2MSF TNGXA03.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(Ol eDbConnectionString
| constr, OleDbConnection connection) +1054849
|
|
System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOption
s
| options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection
| owningObject) +53
|
|
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup) +27
|
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
| owningConnection) +47
|
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
| outerConnection, DbConnectionFactory connectionFactory) +105
| System.Data.OleDb.OleDbConnection.Open() +37
| System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.Execut eSelect(DataSourceSelectAr
guments arguments) +1770
|
|
System.Web.UI.WebControls.AccessDataSourceView.Exe cuteSelect(DataSourceSelec
tArguments arguments) +74
| System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments
arguments,
| DataSourceViewSelectCallback callback) +17
| System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
| System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
| System.Web.UI.WebControls.DetailsView.DataBind() +4
| System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
| System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +181
|
System.Web.UI.WebControls.CompositeDataBoundContro l.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
|
|
|
|
----------------------------------------------------------------------------
----
| Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
| Version:2.0.50727.42
|

Nov 24 '05 #2

P: n/a
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

Nov 24 '05 #3

P: n/a
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==?=" <de********@newsgroup.nospam>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 23:31:06 -0800
| Lines: 10
| Message-ID: <5B**********************************@microsoft.co m>
| 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!TK2MSFT NGXA03.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
|
|

Nov 24 '05 #4

P: n/a
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

Nov 24 '05 #5

P: n/a
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.)

Nov 24 '05 #6

P: n/a
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
Nov 24 '05 #7

P: n/a
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==?=" <de********@newsgroup.nospam>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
<5B**********************************@microsoft.co m>
<BX**************@TK2MSFTNGXA02.phx.gbl>
<2A**********************************@microsoft.co m>
<L8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Server Error in '/Access' Application
| Date: Thu, 24 Nov 2005 04:51:07 -0800
| Lines: 6
| Message-ID: <59**********************************@microsoft.co m>
| 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!TK2MSFT NGXA03.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
|

Nov 25 '05 #8

P: n/a
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

Nov 25 '05 #9

P: n/a
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" <de********@nospam.gmail.com>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
<5B**********************************@microsoft.co m>
<BX**************@TK2MSFTNGXA02.phx.gbl>
<2A**********************************@microsoft.co m>
<L8**************@TK2MSFTNGXA02.phx.gbl>
<59**********************************@microsoft.co m>
<b3**************@TK2MSFTNGXA02.phx.gbl>
<1C**********************************@microsoft.co m>
| 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: <#L**************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 192.117.113.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:361029
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| "dennist685" <de********@newsgroup.nospam> wrote in message
| news:1C**********************************@microsof t.com...
| > 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
| >
|
|
|

Nov 28 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.