[英]How can stored procedure return no rows when called from BIDS but return rows when called from SSMS when using the same parameter?
[英]Stored Procedure is not appearing in SSMS
在 SQL Server Management Studio 2008 中,我創建了一個存儲過程,但在 Object 資源管理器中查看時,它沒有出現在“存儲過程”列表中。
我也重新啟動了服務器,重新啟動了我的機器,並在其他機器上進行了測試,但存儲過程仍然沒有出現。
我知道這個存儲過程存在於系統中,因為如果我執行以下查詢:
exec dbo.sp_Orders
我收到以下錯誤:
Msg 201, Level 16, State 4, Procedure sp_Orders, Line 0
Procedure or Function 'sp_Orders' expects parameter '@OrderID', which was not supplied.
因此它認識到存儲過程存在,甚至返回關於未提供的參數的錯誤。
為什么會發生這種情況,如何訪問存儲區?
你可以嘗試followign來訪問你的sp:
exec sp_helptext xxxx
其中 xxxx 是您的 sp 名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.