473,399 Members | 3,401 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,399 software developers and data experts.

File in use error

I am recieving an error about not being able to use a file because it is
already in use. Based on the error, I think it is referring to my DB, but I
don't know how to avoid the error or why it is happening. Here is the error:
Server Error in '/LVBEP' 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:

Line 41: Dim memberadapter As New OleDb.OleDbDataAdapter("SELECT *
FROM members ORDER BY name", "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
& Server.MapPath("LVBEP.mdb"))
Line 42:
Line 43: memberadapter.Fill(members)
Line 44: datEditMembers.DataSource = members
Line 45: datEditMembers.DataBind()

Source File: C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb Line: 43

Stack Trace:

[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
LVBEP.memberadmin.RefreshMembers() in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:43
LVBEP.memberadmin.Page_Init(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:27
System.Web.UI.Control.OnInit(EventArgs e) +67
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +197

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 21 '05 #1
5 1203
Make sure your Access database file is NOT open in Windows. I.e., make
sure you are closed out of it. I don't know if that's the cause of YOUR
error, but I do know that things can get 'funky' if you have Access
opened, inspecting/modifying your database, and you try to work with it
via an ASP.NET page...

hth

Nathan Sokalski wrote:
I am recieving an error about not being able to use a file because it is
already in use. Based on the error, I think it is referring to my DB, but I
don't know how to avoid the error or why it is happening. Here is the error:
Server Error in '/LVBEP' 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:

Line 41: Dim memberadapter As New OleDb.OleDbDataAdapter("SELECT *
FROM members ORDER BY name", "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
& Server.MapPath("LVBEP.mdb"))
Line 42:
Line 43: memberadapter.Fill(members)
Line 44: datEditMembers.DataSource = members
Line 45: datEditMembers.DataBind()

Source File: C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb Line: 43

Stack Trace:

[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
LVBEP.memberadmin.RefreshMembers() in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:43
LVBEP.memberadmin.Page_Init(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:27
System.Web.UI.Control.OnInit(EventArgs e) +67
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +197

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

--

Scott Mitchell [ASP.NET MVP]
mi******@4GuysFromRolla.com
http://www.4GuysFromRolla.com/ScottMitchell
Nov 21 '05 #2
I did not have Access (or any other programs that use Access or any Access
DBs) open at the time. I even tried restarting my computer to make sure
nothing was running in the background, but it did not help.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:UN*************@newssvr11.news.prodigy.com...
Make sure your Access database file is NOT open in Windows. I.e., make
sure you are closed out of it. I don't know if that's the cause of YOUR
error, but I do know that things can get 'funky' if you have Access
opened, inspecting/modifying your database, and you try to work with it
via an ASP.NET page...

hth

Nathan Sokalski wrote:
I am recieving an error about not being able to use a file because it is
already in use. Based on the error, I think it is referring to my DB, but
I don't know how to avoid the error or why it is happening. Here is the
error:
Server Error in '/LVBEP' 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:

Line 41: Dim memberadapter As New OleDb.OleDbDataAdapter("SELECT
* FROM members ORDER BY name", "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=" & Server.MapPath("LVBEP.mdb"))
Line 42:
Line 43: memberadapter.Fill(members)
Line 44: datEditMembers.DataSource = members
Line 45: datEditMembers.DataBind()

Source File: C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb Line: 43

Stack Trace:

[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
LVBEP.memberadmin.RefreshMembers() in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:43
LVBEP.memberadmin.Page_Init(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:27
System.Web.UI.Control.OnInit(EventArgs e) +67
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +197

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

--

Scott Mitchell [ASP.NET MVP]
mi******@4GuysFromRolla.com
http://www.4GuysFromRolla.com/ScottMitchell

Nov 21 '05 #3
If you right click on the access DB and choose for properties is the
checkbox 'read-only' checked?
If so uncheck it.
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:Oo**************@TK2MSFTNGP15.phx.gbl...
I did not have Access (or any other programs that use Access or any Access
DBs) open at the time. I even tried restarting my computer to make sure
nothing was running in the background, but it did not help.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:UN*************@newssvr11.news.prodigy.com...
Make sure your Access database file is NOT open in Windows. I.e., make
sure you are closed out of it. I don't know if that's the cause of YOUR
error, but I do know that things can get 'funky' if you have Access
opened, inspecting/modifying your database, and you try to work with it
via an ASP.NET page...

hth

Nathan Sokalski wrote:
I am recieving an error about not being able to use a file because it is already in use. Based on the error, I think it is referring to my DB, but I don't know how to avoid the error or why it is happening. Here is the
error:
Server Error in '/LVBEP' 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:

Line 41: Dim memberadapter As New OleDb.OleDbDataAdapter("SELECT * FROM members ORDER BY name", "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=" & Server.MapPath("LVBEP.mdb"))
Line 42:
Line 43: memberadapter.Fill(members)
Line 44: datEditMembers.DataSource = members
Line 45: datEditMembers.DataBind()

Source File: C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb Line: 43

Stack Trace:

[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
LVBEP.memberadmin.RefreshMembers() in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:43
LVBEP.memberadmin.Page_Init(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:27
System.Web.UI.Control.OnInit(EventArgs e) +67
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +197
-------------------------------------------------------------------------

-------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

--

Scott Mitchell [ASP.NET MVP]
mi******@4GuysFromRolla.com
http://www.4GuysFromRolla.com/ScottMitchell


Nov 21 '05 #4
Bob
Nathan:

Make sure your closing your connection after you access your data in your
code.

Look for a file LVBEP..ldb on the server in the same dir as the LVBEP.mdb
file. If it it's there, delete it.

If you have access to the IIS Administrator, open the IIS Admin.

Right click the site and click properties. Click the "home Directory" tab
and click the "Unload" button then delete the LVBEP.ldb file.

Then try your connection again. As I said, make extra sure your closing the
connection in your code.

MyOLEDBConnection.Open()

Fill your dataAdapters

MyOLEDBConnection.Close()

By chance, your not developing against a DB that is also in production are
you?

Make sure your Access file is not in the root. Put it in a sub dir of the
root and don't give the "Everyone" account read permissions.

Be sure not to load data directly into a session object. Use sessions
sparingly.

HTH

Bob
Nov 21 '05 #5
ReadOnly was not checked.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Pipo" <No****@me.com> wrote in message
news:OS****************@TK2MSFTNGP10.phx.gbl...
If you right click on the access DB and choose for properties is the
checkbox 'read-only' checked?
If so uncheck it.
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:Oo**************@TK2MSFTNGP15.phx.gbl...
I did not have Access (or any other programs that use Access or any
Access
DBs) open at the time. I even tried restarting my computer to make sure
nothing was running in the background, but it did not help.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:UN*************@newssvr11.news.prodigy.com...
> Make sure your Access database file is NOT open in Windows. I.e., make
> sure you are closed out of it. I don't know if that's the cause of
> YOUR
> error, but I do know that things can get 'funky' if you have Access
> opened, inspecting/modifying your database, and you try to work with it
> via an ASP.NET page...
>
> hth
>
>
>
> Nathan Sokalski wrote:
>> I am recieving an error about not being able to use a file because it is >> already in use. Based on the error, I think it is referring to my DB, but >> I don't know how to avoid the error or why it is happening. Here is
>> the
>> error:
>> Server Error in '/LVBEP' 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:
>>
>> Line 41: Dim memberadapter As New OleDb.OleDbDataAdapter("SELECT >> * FROM members ORDER BY name", "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
>> SOURCE=" & Server.MapPath("LVBEP.mdb"))
>> Line 42:
>> Line 43: memberadapter.Fill(members)
>> Line 44: datEditMembers.DataSource = members
>> Line 45: datEditMembers.DataBind()
>>
>> Source File: C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb Line: 43
>>
>> Stack Trace:
>>
>> [OleDbException (0x80004005): Could not use ''; file already in use.]
>> System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
>> System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
>> System.Data.OleDb.OleDbConnection.Open() +203
>> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection
>> connection,
>> ConnectionState& originalState) +44
>> System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
>> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
>> CommandBehavior behavior) +304
>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
>> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
>> CommandBehavior behavior) +77
>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
>> LVBEP.memberadmin.RefreshMembers() in
>> C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:43
>> LVBEP.memberadmin.Page_Init(Object sender, EventArgs e) in
>> C:\Inetpub\wwwroot\LVBEP\memberadmin.aspx.vb:27
>> System.Web.UI.Control.OnInit(EventArgs e) +67
>> System.Web.UI.Control.InitRecursive(Control namingContainer) +241
>> System.Web.UI.Page.ProcessRequestMain() +197
>>
>>
>>

------------------------------------------------------------------------- ------- >> Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
>> ASP.NET Version:1.1.4322.2032
>
>
> --
>
> Scott Mitchell [ASP.NET MVP]
> mi******@4GuysFromRolla.com
> http://www.4GuysFromRolla.com/ScottMitchell



Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
1
by: unknown198790 | last post by:
actually i created tftp server.server was created successfully but when i try to execute the following it say file not found tftp 192.168.0.1 tftp> put j.txt error code 1: file not found tftp...
7
by: yusufjammy | last post by:
What is the purpose and how to use user defined Assert micros in c++ error handling ??
1
by: cannunzi | last post by:
I'm trying to write code that when the file is open i hit my macro & the file name saves as cell A2 and the file saves to the folder on my network. where the question mark is how do i get the code...
0
by: cannunzi | last post by:
I'm trying to save the file with the amount from cell A2 but instead it keeps saving as "Cells(2, 1).Value & FuelTaxReport." Any thoughts? Sub Macro3() ' ' Macro3 Macro ' ' Keyboard Shortcut:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.