SQL code的参数名和调用执行的参数名不一致
@orderid int,@productid int ,@price money
"@OrdeID", SqlDbType.Int); ("@ProductID", SqlDbType.Int); ("@Quantity", SqlDbType.Money)
@orderid int,@productid int ,@price money
"@OrdeID", SqlDbType.Int); ("@ProductID", SqlDbType.Int); ("@Quantity", SqlDbType.Money)
catch
{
MessageBox.Show("操作失败!");
}这里将异常信息抛出来看看嘛,一看就知了
{
MessageBox.Show(e.ToString());
}??不会弄呀。。
catch(SqlException ex)
{
Console.WriteLine(ex.Message);
}
orderid ,@productid ,@price
有这个提示去掉存储过程里的commit.事务没开启,是不能调用提交的
有这个提示去掉存储过程里的commit.事务没开启,是不能调用提交的