Hi I have the following SP, however when I use LINQ to SQL it generates 2 multiple recordsets. For my sanity I am trying to fathom out what it is in the stored procedure that is doing this and would like to only return a single recordset... Can any help?
ALTER PROCEDURE [dbo].[CheckToken]
@LoginId int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @failures INT
SET @failures = (SELECT COUNT(loginid) FROM auditerrorcode WHERE
errorid = 1012 AND loginid = @loginid
AND datecreated > DATEADD(hh, -1, getdate())
)
IF @failures > 10 UPDATE [login] SET [IsDisabled]=1 WHERE loginid = @loginid
SELECT * FROM [Login] WHERE LoginId = @LoginId
END