Hi, I have a syntax error while trying to insert my data to Access database. I could not find where the error is. My ex.Message is Syntax error in INSERT INTO statement. Could you help me?
string Sorgu = "INSERT INTO SarjVerileri (Ad, Soyad, EPosta, TelefonNum, DogumTar, PinKodu" + "VALUES(" + this.Ad + ", '" + this.Soyad + "', '" + "', '" + this.EPosta + "', '" + this.TelefonNum + "', '" + this.DogumTar + "', '" + this.PinKodu + "')";
string sorgu = "INSERT INTO KasaKontrol (KasaNumarasi, CepTelefonu, MusPinKodu" + "VALUES(" + this.KasaNum + "', '" + this.TelefonNum + "', '" + this.PinKodu + "')";
if (bag.State == ConnectionState.Closed)
bag.Open();
komut.CommandText = Sorgu;
komut.Connection = bag;
komut.ExecuteNonQuery();
bag.Close();
if (bag.State == ConnectionState.Closed)
bag.Open();
komut.CommandText = sorgu;
komut.Connection = bag;
komut.ExecuteNonQuery();
bag.Close();