4
嗨我有這樣的SQL參數即時得到的口頭禪拆箱爲INT錯誤不能拆箱爲INT
returnValue = (int)cmdUpdateCreatedOn.Parameters["@intcount"].Value;
返回值被聲明爲INT的returnValue = 0 和我的參數也被聲明爲int和它正在獲取已更新行的行數。 我試過不同的轉換語法似乎沒有工作。
MY 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
看看調試器中的值。什麼是價值?它的類型是什麼?我的錢的價值要麼是可空的int,要麼實際上是null,但不管問題是什麼,解決這個問題都是微不足道的。 – Servy
你得到了什麼*確切*錯誤? –
在調試器中它的值是一個整數,它說,不能解除'cmdUpdateCreatedOn.Parameters [「@ intcount」]。Value'作爲int – CSharper