insert into 语句语法错误???
部分代码如下
string ModName = ((TextBox)e.Item.Cells[2].Controls[0]).Text;
string Price = ((TextBox)e.Item.Cells[3].Controls[0]).Text;
UpdateCommand.CommandText = "INSERT INTO price_list(module, price) VALUES(@module, @price)";
UpdateCommand.Parameters.Add("@module", OleDbType.VarChar).Value = ModName;
UpdateCommand.Parameters.Add("@price", OleDbType.Single).Value = Price;
myConnection.Open();
UpdateCommand.ExecuteNonQuery();
意图是从网页表单里填的东西添加到数据库记录。我用Access数据库,表格只有两个字段(字符型module,小数型price)。结果一运行就说inser into 语句语法错误。
我是上个星期开始接触ASP.NET的,如果还需要提供什么信息,请告知。