This is procedure :
In SQL console, it run very good :
Now, I want to call this procedure by VB.NET. Help me
VB.NET:
CREATE PROCEDURE prc_Check_Banding
@User_Name nvarchar(50),
@Time_Diff int OUTPUT
AS
BEGIN
DECLARE @Start_Date smalldatetime
DECLARE @End_Date smalldatetime
SELECT @Start_Date=[Start_Banding], @End_Date=[End_Banding] FROM User_Banding WHERE [User_Name]=@User_Name
return DATEDIFF(SECOND,@Start_Date,@End_Date)
END
VB.NET:
DECLARE @second int, @Time int
exec @second=prc_Check_Banding 'admin', @Time
Select @second