N
Nathan Sokalski
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(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object 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
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(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object 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