USP_AMPROIMPORTROW_DELETE

Executes the "AuctionMaestro Pro Batch Row: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


                    CREATE procedure dbo.USP_AMPROIMPORTROW_DELETE
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier
                    )
                    as
                    set nocount on;

                    declare @CONTEXTCACHE varbinary(128);

                    begin try
                        if @CHANGEAGENTID is null
                            exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;

                        set @CONTEXTCACHE = CONTEXT_INFO();

                        if not @CHANGEAGENTID is null
                            set CONTEXT_INFO @CHANGEAGENTID;

                        delete dbo.BATCHAMPROIMPORT where ID = @ID;

                        if not @CONTEXTCACHE is null
                            set CONTEXT_INFO @CONTEXTCACHE;
                    end try
                    begin catch
                        exec dbo.USP_RAISE_ERROR;

                        if not @CONTEXTCACHE is null
                            set CONTEXT_INFO @CONTEXTCACHE;

                        return 1;
                    end catch

                    return 0;