when I try to create this SP I get: "incorrect syntax near @.MyResult"
I have tried INT and different variable names, but get same error.
CREATE PROCEDURE sp_IsValidLogon
@.UserName varchar(16),
@.Password varchar(16) ,
@.MyResult varchar(3) OUTPUT
As
if exists(Select * From User_Table
Where UserName = @.UserName
And
Password = @.Password)
begin
@.MyResult = 1
end
else
begin
INSERT INTO FailedLogons(UserName, Password)
values(@.UserName, @.Password)
declare @.totalFails int
Select @.totalFails = Count(*) From FailedLogons
Where UserName = @.UserName
And dtFailed > GetDate()-1
if (@.totalFails > 5)
UPDATE User_Table Set Active = 0
Where UserName = @.UserName
@.MyResult = 0
endThe answer is
SET @.MyResult = ...|||Thanks George,
That's sorted it.
I seem to have two threads in this forum now tho' :o sorry guys.|||No worries - I will remove the dupe :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment