0
alter procedure [dbo].[XXX]
(
@vendorworksationID uniqueidentifier ,
@sdate date,
@edate date,
@total int out
)
begin
select @total = COUNT(*)
from AdvertisedCampaignHistory a
where
CAST(a.CreationDate AS DATE) BETWEEN CAST(@sdate as DATE) AND CAST(@edate as DATE)
and a.CampaignID in (select cc.BCampaignID
from BeaconCampaign cc, VendorWorkStation vw
where cc.VendorWorkStationID = vw.VendorWorkStationID
and VendorID = @vendorworksationID)
return @total
end
上面的代碼表明,從SQL Server返回一個整數值的存儲過程如何採取從SQL存儲過程的輸入到return語句
ObjectParameter Output = new ObjectParameter("total", typeof(Int32));
var resBC = this.Context.getTotalSentBeaconCampaign(VendorWorkstationID, sdate,edate,Output).FirstOrDefault();
上面的代碼顯示我如何傳遞參數和在C#側
檢索值在運行我收到以下錯誤
中的DAT代碼由商店數據提供商返回的閱讀器沒有足夠的 列查詢請求。
什麼可能是這個錯誤的可能原因?
我沒有得到錯誤bt我得到0作爲返回值總是 – Abhi 2014-11-14 20:45:28