''Insert into değiminde hata oluştu.'' hatası

Sadvez

Centipat
Katılım
8 Mayıs 2021
Mesajlar
11
Daha fazla  
Cinsiyet
Erkek
Merhabalar, bir uygulma yazıyordum. Veri tabanına veri eklemeye çalışırken bu hata ile karşılaştım nedeni nedir?

KODLAR:
Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;

namespace _192.Kaplan_Filo
{
    public partial class PilotKayitFRM : Form
    {
        public PilotKayitFRM()
        {
            InitializeComponent();
        }
        OleDbConnection baglanti = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + Application.StartupPath + "\\Data.mdb");
        private void PilotKayitFRM_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            OleDbCommand komut = new OleDbCommand("insert into Pilotlar(İsim/Soyisim,Rütbe,Telsiz/Kodu) values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "')",baglanti);
            komut.ExecuteNonQuery();
            label4.Text = "Başarıyla kaydedildi";
            textBox1.Clear();
            textBox2.Clear();
            textBox3.Clear();
            baglanti.Close();
        }
    }
}
 
Son düzenleyen: Moderatör:

Yeni konular

Geri
Yukarı