Added stored procedure to delete pdfs
This commit is contained in:
parent
3053c892a1
commit
24e3a9d7f5
@ -10395,4 +10395,36 @@ GO
|
||||
-- Display the status of Proc creation
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: getJustStage Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: getJustStage Error on Creation'
|
||||
GO
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [vesp_DeletePDFs] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_DeletePDFs]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [vesp_DeletePDFs];
|
||||
GO
|
||||
|
||||
/*
|
||||
exec vesp_DeletePDFs
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||
*****************************************************************************/
|
||||
CREATE PROCEDURE vesp_DeletePDFs
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
BEGIN TRY -- Try Block
|
||||
BEGIN TRANSACTION
|
||||
DELETE FROM [Pdfs]
|
||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||
END TRY
|
||||
BEGIN CATCH -- Catch Block
|
||||
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
|
||||
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
|
||||
EXEC vlnErrorHandler
|
||||
END CATCH
|
||||
GO
|
||||
-- Display the status of Proc creation
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_DeletePDFs Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: vesp_DeletePDFs Error on Creation'
|
||||
GO
|
||||
|
Loading…
x
Reference in New Issue
Block a user