Retrieving SQL Server output variables in c#

后端 未结 5 1376
醉梦人生
醉梦人生 2020-12-18 04:25

I have a stored procedure:

ALTER PROCEDURE [dbo].[pr_Tbl_Test_Insert]
    @guidid uniqueidentifier output,
    @sname nvarchar(50)
AS
-- INSERT a new row in          


        
5条回答
  •  时光说笑
    2020-12-18 04:47

    You need to construct a SqlParameter using one of the constructors that lets you specify a ParameterDirection, such as this one. Alternatively, construct your parameter and then set the direction using the Direction property.

    Check this link on MSDN for more information.

提交回复
热议问题