Skip to main content

AccessTr.neT


Data Type Mismatch Hatası Hakkında

alperalper00
alperalper00
8
11158

Data Type Mismatch Hatası Hakkında

Çözüldü #7
internette birşey aramaya gerek kalmadı
her sorunun çözümü burada Img-grin

bende kullandım expression sorunu çözümünü .
teşekkürler
Cevapla
#8
Data type mismatch hatasi veriyor lutfen yardimci ola bilirmisiniz

 
private void button1_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            OleDbCommand komut = baglanti.CreateCommand();
            komut.CommandType = CommandType.Text;
          //  string Daxil_olma_tarixi = Daxil_olma_tarixi.ToString("yyyyMMdd");
            komut.CommandText = "insert into Daxil_olan_senedler(Daxil_olma_nomresi, Daxil_olma_tarixi, Kodu, Gonderenin_kodu, Qeydiyyat_tarixi, Qeydiyyat_nomresi, Gonderen_sexs, Qisa_mezmun) values('" + textBox1.Text + "' , '" + textBox2.Text + "', '" + textBox3.Text + "', '" + textBox4.Text + "', '" + textBox5.Text + "', '" + textBox6.Text + "', '" + textBox7.Text + "', '" + textBox8.Text + "')";
            komut.ExecuteNonQuery();
            baglanti.Close();
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
            textBox7.Text = "";
            textBox8.Text = "";

            MessageBox.Show("Record Inserts Succesfully !");
        }
Cevapla
#9
(20/05/2017, 13:19)Ceyhun Babayev yazdı: Data type mismatch hatasi veriyor lutfen yardimci ola bilirmisiniz

 
private void button1_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            OleDbCommand komut = baglanti.CreateCommand();
            komut.CommandType = CommandType.Text;
          //  string Daxil_olma_tarixi = Daxil_olma_tarixi.ToString("yyyyMMdd");
            komut.CommandText = "insert into Daxil_olan_senedler(Daxil_olma_nomresi, Daxil_olma_tarixi, Kodu, Gonderenin_kodu, Qeydiyyat_tarixi, Qeydiyyat_nomresi, Gonderen_sexs, Qisa_mezmun) values('" + textBox1.Text + "' , '" + textBox2.Text + "', '" + textBox3.Text + "', '" + textBox4.Text + "', '" + textBox5.Text + "', '" + textBox6.Text + "', '" + textBox7.Text + "', '" + textBox8.Text + "')";
            komut.ExecuteNonQuery();
            baglanti.Close();
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
            textBox7.Text = "";
            textBox8.Text = "";

            MessageBox.Show("Record Inserts Succesfully !");
        }

Merhaba. 
Tabloya kaydedilecek alanların veri türünün görülmesi için projenizin incelenmesi gerekli.
Kodda tüm alanlar için '" + textBox1.Text + "' şeklinde tek tırnak eklenmiş. Sorun muhtemelen ' ile ilgili.
İlgili bölüme projenizi ekleyerek yeni konu açınız.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task