Get Return Value from Stored procedure in asp.net

前端 未结 6 1182
既然无缘
既然无缘 2020-12-10 11:19

i have a stored procedure

ALTER PROC TESTLOGIN
    @UserName varchar(50),
    @password varchar(50)
As
Begin
    declare @return int;

    set @return  = (S         


        
6条回答
  •  余生分开走
    2020-12-10 12:03

    If you want to to know how to return a value from stored procedure to Visual Basic.NET. Please read this tutorial: How to return a value from stored procedure

    I used the following stored procedure to return the value.

    CREATE PROCEDURE usp_get_count
    
    AS
    BEGIN
     DECLARE @VALUE int;
    
     SET @VALUE=(SELECT COUNT(*) FROM tblCar);
    
     RETURN @VALUE;
    
    END
    GO
    

提交回复
热议问题