当前位置: 代码迷 >> ASP.NET >> mysql出入语句有关问题
  详细解决方案

mysql出入语句有关问题

热度:6189   发布时间:2013-02-25 00:00:00.0
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
------解决方案--------------------------------------------------------
字写错了。
  相关解决方案