我有这个 sql 参数我得到了 cant unbox as int 错误
returnValue = (int)cmdUpdateCreatedOn.Parameters["@intcount"].Value;
返回值被声明为int returnValue = 0,我的参数也被声明为int,它正在更新行数。我尝试了不同的转换语法,但似乎都不起作用。
我的 SP 是
ALTER Procedure [dbo].[UpdateStation]
@intcount int output AS
select StationaryName into #stname from Stationaries where Authorized = 0
select * from #stname
Update Stationaries Set Authorized = 1 where Authorized = 0 set @intcount = @@rowcount