I have the following asp code:<BR><BR>Set rsUserId = Server.CreateObject("ADODB.RecordSet")<BR>Set objCmd = Server.CreateObject("ADODB.Command")<BR>With objCmd<BR>.ActiveConnection = objConn<BR>.CommandType = adCmdStoredProc<BR>.CommandText = "IsValid_SP"<BR>.Parameters.Append objcmd.CreateParameter("return",adInteger, adParamReturnValue, 4)<BR>.Parameters.Append objCmd.CreateParameter("@username", adVarChar,adParamInput, 50, username)<BR>.Parameters.Append objCmd.CreateParameter("@password", adVarChar,adParamInput, 8, Useremail)<BR>end With<BR>Set rsUserId = objCmd.Execute<BR><BR>myid = rsUserId<BR><BR>IsValid = objcmd.Parameters("return").Value<BR><BR>********* *************************************************< BR>The following is my Stored Procedure Code:<BR><BR>CREATE PROCEDURE dbo.IsValidLogon_SP<BR> @UserName varchar(50),<BR> @Password varchar(25)<BR>AS<BR>if exists(Select * From tblStudents<BR> Where UserName = @UserName<BR> And<BR> Password = @Password)<BR><BR> begin<BR><BR> Select u_id From tblStudents<BR> Where UserName = @ UserName<BR> return(1)<BR> end<BR>else<BR> begin<BR> INSERT INTO FailedLogons(UserName, Password)<BR> values(@UserName, @Password)<BR> declare @totalFails int<BR> Select @totalFails = Count(*) From FailedLogons<BR> Where UserName = @UserName<BR> And dtFailed &#062; GetDate () -1<BR><BR> if (@totalFails &#062;3)<BR> Update tblStudents Set Active = 0<BR> Where UserName = @UserName<BR> return(0)<BR> end<BR><BR>The stored procedure runs in QueryAnalyzer, but when the ASP page is ran I get no return value to assign to IsValid. Dependant on the value of IsValid the code proceeds further.<BR><BR>The program runs now with two separate calls to the db. One with the return parameter only and the other actually returning a recordset with the user&#039s id number. I want to combine into one stored proceedure.<BR><BR>Jay