From: JB on
Hello Community

In my ASP.Net program using C# I call a
stored procedure but no memberno value returns. This is how
I call the method from C#:

int membernum = 0;
dset = loadNewMember(memberno);
membernum = memberno;

--- This layer calls the stored procedure:

public DataSet loadNewMember(int memberno)
{
DataSet dset1 = new DataSet();

string dsetErrors = "";
SqlParameter[] Params = { new SqlParameter("@memberno", memberno) };

try
{
if ("spGetNewMember", @Params, 30)
{
return dset1 ;
}
return dset1;
}
catch (Exception ex)
{
dsetErrors = ex.Message;
}
return dset1 ;
}


---This is the stored procedure that calls that doesn't return the value for
memberno:

Alter PROCEDURE [dbo].[spGetNewMember]
(@memberno int)
AS
BEGIN
Select @memberno = max(ID)
From MemberTable
return @memberno
END
go


Why doesn't the memberno get returned?

Jeff
--
JB