在这里,我在我的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);
答案 0 :(得分:0)
也许这个?
var execProc="EXEC ProcName FirstName=@0,LastName=@1,UserName=@2,Password=@3, UID=@4";
db.Execute(execProc,FirstName,LastName,UserName,Password,Userid);