帮看看有错吗
存储过程:
ALTER PROCEDURE App_Customers_UpdatePassword
@CustomerID int,
@Password nvarchar(32)
AS
Update Customers Set Password = @Password Where CustomerID = @CustomerID
RETURN
方法:
public static bool UpdatePassword(int CustoemrID, String Password)
{
try
{
SqlParameter [] par = new SqlParameter[2];
par[0] = new SqlParameter( "@CustomerID ",SqlDbType.Int);
par[0].Value = CustoemrID;
par[1] = new SqlParameter( "@Password ",SqlDbType.NVarChar);
par[1].Value = Password;
ExecuteSql( "App_Customers_UpdatePassword ",par);
return true;
}
catch
{
return false;
}
}
ExecuteSql为自己写的方法,有错误吗?
------解决方案--------------------CustoemrID 这个写错了 CustomerID