Add explicit @RC handling in SQL for delete/update procs

Updated DeleteObjectProcedureHandler and UpdateObjectProcedureHandler to declare, initialize, and select the @RC variable in their SQL command strings. This ensures the stored procedure return code is explicitly captured and returned by the query.
This commit is contained in:
2026-01-20 15:39:54 +01:00
parent ff4ab9efe2
commit 304490d661
2 changed files with 2 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ public class DeleteObjectProcedureHandler(IRepository repo) : IRequestHandler<De
};
var result = await repo.ExecuteQueryRawAsync(
"DECLARE @RC SMALLINT = 0; " +
"EXEC @RC = [dbo].[PRREC_DELETE_OBJECT] " +
"@pENTITY, @pSTART, @pEND, @pFORCE; " +
"SELECT @RC;",