1

在这里,我在我的 webmatrix 表单中编写更新查询,该表单运行正确,但我想使用存储过程代替查询,那么我该如何编写呢?

var UpdateQuery = "UPDATE Reg_tb SET FirstName = @0, LastName = @1, UserName = @2, Password  = @3 WHERE UID = @4";
db.Execute(UpdateQuery, FirstName, LastName, UserName, Password, Userid);
4

1 回答 1

0

也许这个?

var execProc="EXEC ProcName FirstName=@0,LastName=@1,UserName=@2,Password=@3, UID=@4";
  db.Execute(execProc,FirstName,LastName,UserName,Password,Userid);
于 2013-01-01T13:20:50.713 回答