Skip to main content

Hello All

i created an smo which takes 1 input and 3 output parameters.Executed storproc in sql and works as expected when i send input parameter which is required parameter and get my output.

 

when i create an smo to execute storeproc execute method in smo tester tool it asks all 4 parameters(1 input and 3 output) as REQUIRED.

 

In sql while executing it works as expected passing 1 parameter which is input iam getting 3 output parameter result.

 

Anyone faced this and any suggestion

 

Username input i get output parameters as expeced

Hi Haridoll1,

 

While creating stored procedure , pass output parameter default value  as null,  refer below example

 

 

Create procedure Sp_GetEmployeeDetails 
(
@Id int,
@EmployeeCode nvarchar(max)=null OUTPUT,
@EmployeeFirstName nvarchar(max)=null OUTPUT,
@EmployeeLastName nvarchar(max)=null OUTPUT
)
as
Begin
SELECT @EmployeeCode=eEmployeeCode]
,@EmployeeFirstName=tEmployeeFirstName]
,@EmployeeLastName=tEmployeeLastName]

FROM dbo.employeedetails where Id=@Id

End

 


Reply