I have this sql parameter im getting the cant unbox as int error
returnValue = (int)cmdUpdateCreatedOn.Parameters["@intcount"].Value;
return value is declared as int returnValue = 0 and my parameter is also declared as int, and it is getting the rowcount of rows updated. I've tried different converting syntax none seem to work.
MY SP is
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