我在sql server上創建了一個存儲過程來更新記錄,雖然在我插入所需的參數時它工作正常......但是當涉及到ASP .NET時,當我運行應用程序時新聞更新ASPX GridView它給了我一個消息 「過程或函數custUPDATE指定的參數太多。」存儲過程和ASP .NET
這裏是我的程序
alter proc custUPDATE
(@odid int,
@customer_id int,
@priceID int,
@etAMOUNT int,
@amntPaid decimal(18,2),
@od_status varchar(20),
@py_status varchar(20),
@order_date smalldatetime
-- @dummy varchar(30) =null
)
as
begin
set nocount on;
declare @amnt_paid decimal(18,2);
declare @rmn decimal(23,4);
declare @tt money;
select @amnt_paid=eggsOrders.amnt_paid from eggsOrders where [email protected];
select @rmn= orderVIEW.Remaining from orderVIEW where [email protected];
select @tt=orderVIEW.Total from orderVIEW where [email protected];
--select @amnt_paid= amnt_paid from inserted;
if(@[email protected])
begin
update [dbo].[eggsOrders] set [email protected]_id, [email protected], [email protected], [email protected], [email protected]_status, py_status='paid in full', [email protected]_date where [email protected];
end
else if(@amnt_paid>0 and @[email protected])
begin
update [dbo].[eggsOrders] set [email protected]_id, [email protected], [email protected], [email protected], [email protected]_status, py_status='In-Progress', [email protected]_date where [email protected]
end
else if(@amnt_paid=0 and @rmn [email protected])
begin
update [dbo].[eggsOrders] set [email protected]_id, [email protected], [email protected], [email protected], [email protected]_status, py_status='Payment Pending', [email protected]_date where [email protected]
end
end
go
我在做什麼錯誤的代碼??? 請幫忙