我试图创建与winform应用相同的登录功能,以从MySql服务器检查登录详细信息,就像它与MsSql Server进行检查一样。我试图将此MsSql存储过程转换为MySql存储过程,但我无法这样做。有谁可以帮忙吗?
PROCEDURE [dbo].[CheckAccessDetails]
(
@IsUsernameCorrect BIT OUTPUT
,@IsPasswordCorrect BIT OUTPUT
,@UserAccessActive BIT OUTPUT
,@Username NVARCHAR (50)
,@Password NVARCHAR (50)
)
AS
BEGIN
SET @IsUsernameCorrect = 0
SET @IsPasswordCorrect = 0
SET @UserAccessActive = 0
IF EXISTS (SELECT * FROM [dbo].[MMAUsers] WHERE [UserName] = @Username AND [Password] = @Password AND [IsAccessActive] = 1)
BEGIN
SET @IsUsernameCorrect = 1
SET @IsPasswordCorrect = 1
SET @UserAccessActive = 1
END
ELSE
BEGIN
IF EXISTS (SELECT * FROM [dbo].[MMAUsers] WHERE [UserName] = @Username AND [Password] = @Password)
BEGIN
SET @IsUsernameCorrect = 1
SET @IsPasswordCorrect = 1
END
ELSE
BEGIN
IF EXISTS (SELECT * FROM [dbo].[MMAUsers] WHERE [UserName] = @Username)
BEGIN
SET @IsUsernameCorrect = 1
END
END
END
END