I am getting the error as SQLITE database file was locked when I tried to open the connection multiple times this is what I have written
if (m_oDataSet2.Tables["401k"].Rows.Count != 0)
{
double maxlimit;
using (SQLiteConnection conn = new SQLiteConnection("Data Source=" + path + ""))
{
conn.Open();
}
}
On first hit it is executing fine when it is looping for the second time I am getting this error how to resolve this
Try closing the connection each time after you’re finished with it. Or, just open it once on program startup and retain the connection throughout your app’s lifetime.