При выполнении метода
private void Mudak()
{
SQLiteConnection conn = new SQLiteConnection(ConnStr);
SQLiteCommand command = new SQLiteCommand("select FIO from BlackList where FIO = '" + txtName.Text + "'", conn);
conn.Open();
SQLiteDataReader reader = command.ExecuteReader();
if (reader.Read())
txtName.ForeColor = Color.Red;
else
txtName.ForeColor = Color.Blue;
conn.Close();
}
невозможно работать с бд, пишет:"database is locked database is locked" Это происходит, только когда условие if подходит. Грешу на то,что не закрывается соединение, но почему не пойму
conn
,command
иreader
вusing
?