日期:2014-05-18  浏览次数:20430 次

mysql出入语句问题
C# code
        string a = TextBox3.Text;
        string b = path.Value;
        string c = TextBox5.Text;
        string d = TextBox2.Text;
        string f = TextBox4.Text;
        string sqlstr = "inseret into product(pid,pname,url,details,sortid) values("+"'"+a+"',"+"'"+c+"',"+"'"+b+"',"+"'"+f+"',"+"'"+d+"')";
        MySqlCommand sqlcom = new MySqlCommand(sqlstr, sqlconn);
        sqlcom.ExecuteNonQuery();


出现如下错误

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inseret into product(pid,pname,url,details,sortid) values('1','a','productp/图' at line 1

------解决方案--------------------
mysql插入关键字是inseret吗?insert
------解决方案--------------------
字写错了。