Stored Procedure Error in MS Access
hi all,
The following code works properly on SQL-server. I tried to modify the code so that I can run it using MS Access. However, I have got Create procedure error. Is it possible to create procedure in MS Access? which line do I need to delete so that the code would work in MS Access?
Thank you
CREATE PROCEDURE CheckPassword (
@userName Text,
@password Text,
@sessionkey Number Output,
@expiration DateTime Output,
@userID Number Output,
@role Number Output )
As
SELECT
@userID = userID,
@role = role
From webserviceUsers
where userName = @userName
AND password = @password
If @userID IS NOT NULL
Begin
SET @sessionkey = NEWID()
SET @expiration = DateAdd(mi, 30, GetDate() )
INSERT INTO sessionKeys (session_key,
session_expiration,session_userID, session-userName,
session_role)
VALUES (@sessionkey, @expiration, @userID, @userName, @role )
END
Else
return -1;
|