I got this error
Error CS0012: The type 'DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (CS0012)
I'm trying to do this:
private void SetConnection()
{
sql_con = new SQLiteConnection("DataSource=kyriosDB.db;Version=3;New=False;Compress=True;");
}
public void ExecuteQuery(string txtQuery)
{
SetConnection();
sql_con.Open();
sql_cmd = sql_con.CreateCommand();
sql_cmd.CommandText = txtQuery;
sql_cmd.ExecuteNonQuery();
sql_con.Close();
}
Someone can help me?
System.Data
. – Salah Akbariusing
directive at the top of the code file does not add a reference. That is not the fix here. – Marc Gravell♦