decomp DBCServer_Release and inspect/document database

This commit is contained in:
Benjamin Palko 2026-10-14 23:22:03 -04:00
parent 4b267cbe05
commit 7834b98bf0
28222 changed files with 843300 additions and 144 deletions

View file

@ -0,0 +1,45 @@
CREATE PROCEDURE [dbo].[UpdateAccountPassword]
@AccountPwd varchar(255),
@Email varchar(255)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Result varchar(20)
DECLARE @AccountExists int;
BEGIN TRY
BEGIN TRANSACTION
SELECT @AccountExists = COUNT(*) FROM AccountTable
WHERE Email = @Email;
-- Check if account exists
IF @AccountExists > 0
SET @Result = 'AccountExists';
ELSE
SET @Result = 'Failed';
-- Update password
IF @Result = 'AccountExists'
BEGIN
UPDATE AccountTable SET AccountPwd = @AccountPwd
WHERE Email = @Email;
SET @Result = 'PasswordChanged';
END;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION;
SET @Result = 'TransactionFailed';
END CATCH
SELECT @Result as Result;
END