CREATE PROCEDURE
Command Run_getp_edit_
— Pan Shin
@p1 int, @p2 int, @p3 int
AS
- -print 'CommandRun_getp_edit_'
declare @cnt int
select @cnt=isnull(max(No),0) from Properties where u=@@spid if @cnt<0 select @cnt=0
delete from Properties where u=@@spid and No=-1
insert into Properties (u,No,
Proc Name,Name,Flag) select @@spid,-1,
,,0
select @cnt=@cnt+1
insert into Properties (u,No,Flag,
Proc Name,Name) select @@spid,@cnt,1, 'view', 'Просмотр указателя исполнения'
- -Print Property 'print', 'Печать указателя исполнения'
if( select status from TCT_CommandRun where UDN=@p1 ) = 0
begin
select @cnt=@cnt+1
insert into Properties (u,No,Flag,
Proc Name,Name) select @@spid,@cnt,2, 'edit', 'Редактирование указателя исполнения'
insert into Properties (u,No,Flag,
Proc Name,Name) select @@spid,@cnt,0, 'CommandRun_Block_','Блокировать указатель исполнения'
insert into Properties (u,No,Flag,
Proc Name,Name) select @@spid,@cnt,0, 'CommandRun_Unblock_','Снять блокировку указателя исполнения'
if not exists (select * from Synch where UDN=@p1)
begin
select @cnt=@cnt+1
insert into Properties (u,No,Flag,
Proc Name,Name) select @@spid,@cnt,0, 'Run_CommandRun_','ИСПОЛНИТЬ'
GO