I have a dropdown on my page that gets populated from Access dataabse. I am not using AccessDataSource but instead just using OleDbConnection object. I keep getting "Could not use ''; file already in use" error. Sometimes it works but most of the time that error comes up. I gave ASPNET user full control to the folder where my mdb file is stored.
here is my connection string and code below:
<add name="conn" connectionString="Provider
.4.0;Data Source=C:\Northwind.mdb;" providerName="System.Data.
public OleDbConnection GetConnection(string strConn)
OleDbConnection conn = null;
conn = new OleDbConnection(strConn);
catch (OleDbException ex)
Console.Write("OleDb ERROR: " + ex.Message);
catch (Exception ex)
Console.Write("ERROR: " + ex.Message);