I would like to ask you where I have problem in my code? I want to insert data to SQLite. Thank you
private void button1_Click(object sender, EventArgs e)
{
con.Open();
if (textBox1.Text == "Pirulau")
{
SQLiteCommand cmd22 = con.CreateCommand();
cmd22.CommandType = CommandType.Text;
cmd22.CommandText = "insert into Pirulau(Dátum opravy, Dodávateľ, Názov náhradného dielu, Číslo náhradného dielu, Cena)values('"+textBox2.Text+"', '"+textBox3.Text+"', '"+textBox4.Text+"', '"+textBox5.Text+"', '"+textBox6.Text+")";
cmd22.ExecuteNonQuery();
DataTable dt = new DataTable();
SQLiteDataAdapter da = new SQLiteDataAdapter(cmd22);
da.Fill(dt);
dataGridView1.DataSource = dt;
}
con.Close();
}