none
return a integer value from stored procedure

    Question

  • hi,

    my stored procedure is 

    CREATE PROCEDURE [dbo].[SP_CheckMixMatchWithOneCloth] (@UserName varchar(50),@Privacy varchar(50),@Mixmatch_Name varchar(50),@Cloth_1 bigint)
    as
    begin
    declare @rowCount int
    set @rowCount = (select count(*) from VW_MixMatchWardrobe where Cloth_1 = @Cloth_1 and UserName=@UserName and Privacy=@Privacy and Mixmatch_Name=@Mixmatch_Name )
    if(@rowCount=0)
    begin
    return (1);
    end
    else
    begin
    return (0);
    end
    end

    when i execute this in sql management it works properly but when i execute this through my web service it always return -1.
    i donot know where i m wrong. Can anybody give solution?

    any help would be appreciated.
    Thursday, October 08, 2009 1:32 PM