hi, I have written this stored procedure (SP) to validate user login. The script should first find for any rows for a combinaiton of Username and password then if the row exist them it should return First and Last anmes of the user and PRowsAffected. If the user doesnt exist it shold return the value in "PRowsAffected"However, in my script there is problem at teh "End"... could you please find the problem in it?Sorry i forgot to include my SP in prior post: CREATE PROCEDURE ProcValidateUser @PUser AS NVARCHAR(30), @PPassword AS NVARCHAR(30), @PFirstName AS NVARCHAR(50) OUTPUT, @PLastName AS NVARCHAR(50) OUTPUT, @PRowsAffected AS INT OUTPUT ASBEGIN SELECT COUNT(*) AS PRowsAffected FROM tblUsers where UserName = @PUser AND Password = @PPassword IF PRowsAffected > 0 SELECT FirstName AS PFirstName, LastName AS PLastName, PRowsAffected FROM tblUsers WHERE UserName = @PUser AND Password = @PPassword; ELSE return PRowsAffected; END IFENDGOThis is to validate a user login from a ASP .NET page!TY
TY