Arama butonu
Bu konudaki kullanıcılar: 1 misafir
4
Cevap
299
Tıklama
0
Öne Çıkarma
ExecuteNonQuery(); HATASI ALIYORUM LÜTFEN ACİL YARDIM LAZIM
K
6 yıl
Er
Konu Sahibi

if (textBox1.Text != "" && textBox2.Text != "" && dateTimePicker1.Text != "" && textBox6.Text != "" && comboBox1.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && comboBox2.Text != "")
{
komut.Connection = baglanti;
baglanti.Open();
komut.CommandText = "insert into ogrencilistele(id,AdSoyad,DogumTarihi,DogumYeri,Cinsiyet,Adres,Telefon,EPosta,Bolum)Values('" + textBox1.Text + "','" + textBox2.Text + "','" + dateTimePicker1.Text + "','" + textBox6.Text + "','" + comboBox1.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + comboBox2.Text + "')";
komut.ExecuteNonQuery();
komut.Dispose();
komut.ExecuteNonQuery();
baglanti.Close();
MessageBox.Show("Kayıt başarı ile eklendi.");
}
else
{
MessageBox.Show("Boş Alanları Doldurunuz.");
}
}

}
}< Resime gitmek için tıklayın >