error: unable to open database file, SQLiteException was unhandled
- by rose
My project has a reference to SQLite.Interop.066.dll and even after putting in the correct path to the SQLite database, the application is still unable to find it. A SQLiteException was unhandled is returned.
SQLiteConnection conn = new SQLiteConnection();
//SQLiteDataAdapter da;
SQLiteCommandBuilder cb;
DataTable dt=new DataTable();
int row = 0;
conn.ConnectionString = "Data Source=C:\\database\\info";
conn.Open();
DataRow dr = dt.NewRow();
dr["name"] = txtName.Text;
dr["address"] = txtAddress.Text;
dr["phone"] = txtPhone.Text;
dr["position"] = txtPosition.Text;
dt.Rows.Add(dr);
da.Update(dt);
row = dt.Rows.Count - 1;
txtName.Text = dt.Rows[row]["name"].ToString();
txtAddress.Text = dt.Rows[row]["address"].ToString();
txtPhone.Text = dt.Rows[row]["phone"].ToString();
txtPosition.Text = dt.Rows[row]["position"].ToString();
da.Fill(dt);
cb = new SQLiteCommandBuilder(da);
conn.Dispose();
conn.Close();
The exception occur at line: conn.Open();
sorry for the mistake title error before...