I have a Stored procedure in SQL Server 2008 and I am using it from my ASP.NET application. I using a Data Access Layer and i created a Function Import for my Stored Procedure.
But the Stored Procedure has output parameter, How to use it now ?
Stored Procedure
ALTER PROCEDURE [dbo].[SPShowLeaveDetails]
(
@LID INT ,
@leave_details VARBINARY(MAX) OUTPUT
)
AS
BEGIN
SELECT @leave_details= leave_details from LeaveTable where LID = @LID
return @leave_details
END
Code for Using Function :
LeaveClass obj = new LeaveClass();
bytes[] b;
b= obj.Function_ShowLeaveDetails(1);
It is showing Error --
Function overload is Function_ShowLeaveDetails(int,System.Data.Objects)
Also, This one is not working :
LeaveClass obj = new LeaveClass();
bytes[] b;
obj.Function_ShowLeaveDetails(1,b);
How do I retrieve the value of output parameter ??