سلام .چرا وقتی کد زیر را در C# مینویسم ارور Syntax error in INSERT INTO statement. میده؟؟؟؟؟؟؟
نام پایگاه داده و جدول و فیلدها هم صحیح است... قبلا درست کار میکرده...
OleDbCommand cmd1 = newOleDbCommand();
cmd1.Connection = con;
cmd1.CommandText = "insert into infostudent(stID,stname,stfamily,group,stcodemelly ,stbirthday,stphone,stotherphone,staddress)" + "values(@stID,@stname,@stfamily,@group,@stcodemell y,@stbirthday,@stphone,@stotherphone,@staddress)".ToString();
cmd1.CommandType = CommandType.Text;
cmd1.Parameters.AddWithValue("@stID", stID.Text);
cmd1.Parameters.AddWithValue("@stname", stname.Text);
cmd1.Parameters.AddWithValue("@stfamily", stfamily.Text);
cmd1.Parameters.AddWithValue("@group", group.Text);
cmd1.Parameters.AddWithValue("@stcocemelly", stcode.Text);
cmd1.Parameters.AddWithValue("@stbirthday", stbirthday.Text);
cmd1.Parameters.AddWithValue("@stphone", stphone.Text);
cmd1.Parameters.AddWithValue("@stotherphone", stotherphone.Text);
cmd1.Parameters.AddWithValue("@staddress", staddress.Text);
con.Open();
cmd1.ExecuteNonQuery();
con.Close();