高手看一下这些代码。
OleDbConnection cnn = new OleDbConnection(Form1.abc );
cnn.Open();
OleDbCommand cmm = new OleDbCommand("Select*from kaka where 学号='" + textBox1.Text.Trim() + "'", cnn);
if (cmm.ExecuteNonQuery() > 0)
MessageBox.Show("已存在", "操作");
else
{
string spla = "insert into kaka(学号,名称,性别,电话,评语)values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "')";
cmm.CommandText = spla;
cmm.ExecuteNonQuery();
MessageBox.Show("添加成功", "操作");
只要我只要(学号,名称)这两个字段,他就正常了,加上后面的性别电话,评语这些就说数目不一致,但我数据库的字段就是这5个呀(学号,名称,性别,电话,评语)怎么会有这种问题