Return value from stored procedure and pass it to ASP page

  • Hi,

    This was the stored procedure I used for getting return value from SQL stored procedure. As i know, it will return integer value. I get this error: Syntax error converting the varchar value 'ret' to a column of data type int. How am I suppose to do in order to get the string value? Thanks for the advance.

    CREATE PROCEDURE test

    @log_id as int

    AS

     declare @solution as varchar(200)

     set @solution=(select solution from tbl_mis_log where log_id=@log_id)

     return @solution

    GO

    lss

  • Return values are integers.

    Alter your stored procedure and read the recordset returned from the stored procedure.

    CREATE PROCEDURE test @log_id as int

    AS

    SET NOCOUNT ON

    select solution from dbo.tbl_mis_log where log_id=@log_id)

    GO

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply