Is it possible to create queries like SQL Stored procedures in MS Access? For example, can you write conditional statements and declare local variables?
CREATE PROCEDURE procname
(
@username varchar(50),
@password varchar(50)
)
DECLARE @IsEnabled bit
IF NOT EXISTS (SELECT * FROM tbl_AdminUsers WHERE username = @username AND password = @password)
BEGIN
SELECT @IsEnabled = IsEnabled FROM tbl_AdminUsers WHERE username = @username
RETURN
END
ELSE
Etc, etc...
If this is possible can someone provide links to tutorials (i've searched high and low and came up with nothing...probably because it's not possible)
CREATE PROCEDURE procname
(
@username varchar(50),
@password varchar(50)
)
DECLARE @IsEnabled bit
IF NOT EXISTS (SELECT * FROM tbl_AdminUsers WHERE username = @username AND password = @password)
BEGIN
SELECT @IsEnabled = IsEnabled FROM tbl_AdminUsers WHERE username = @username
RETURN
END
ELSE
Etc, etc...
If this is possible can someone provide links to tutorials (i've searched high and low and came up with nothing...probably because it's not possible)