C
C.W.
I have got an updateable snapshot based on a view. When close the form, it
automatically sends out the following script to update the underlying table.
exec sp_executesql N'UPDATE "arpos".."tafe_hdr" SET "ref2"=@P1 WHERE
"seqno"=@P2 AND "created_date"=@P3 AND "enrolmentno"=@P4 AND "ord_ref"=@P5
AND "ref1"=@P6 AND "ref2"=@P7 AND "notes" IS NULL AND "invno"=@P8', N'@P1
varchar(6),@P2 int,@P3 datetime,@P4 varchar(12),@P5 varchar(4),@P6
varchar(10),@P7 varchar(4),@P8 int', 'testts', 246, 'Feb 3 2003
12:00:00:000AM', 'p02062693446', 'test', '0203000085', 'test', 246
This screen in ADP simply times out. In SQL Server locks, I can see that
this connection is blocked by itself?! (how is that possible).
I run the same script in query analyser, the script completes under 1 sec.
Any idea what is going on?
I have a trigger on the underlying table that is being updated
CREATE TRIGGER ASAS_UPD_TAFE_HDR ON [dbo].[TAFE_HDR]
FOR UPDATE
AS
if exists (select * from master.dbo.sysprocesses where program_name like
'microsoft office%' and spid=@@spid)
begin
update
a
set
a.transdate=b.created_date,
a.ref2=b.enrolmentno,
a.x_enrol_id=b.enrolmentno,
a.ord_ref=b.ord_ref,
a.ref1=b.ref1
from
dr_trans a inner join inserted b on
a.jobno=b.seqno
insert into asas_audit
select
'Update Invoice Header',
system_user,
host_name(),
getdate(),
invno
from
inserted
end
I don't think it makes any difference. I have included it just in case if
anyone can spot any problem here.
Thanks in advance
automatically sends out the following script to update the underlying table.
exec sp_executesql N'UPDATE "arpos".."tafe_hdr" SET "ref2"=@P1 WHERE
"seqno"=@P2 AND "created_date"=@P3 AND "enrolmentno"=@P4 AND "ord_ref"=@P5
AND "ref1"=@P6 AND "ref2"=@P7 AND "notes" IS NULL AND "invno"=@P8', N'@P1
varchar(6),@P2 int,@P3 datetime,@P4 varchar(12),@P5 varchar(4),@P6
varchar(10),@P7 varchar(4),@P8 int', 'testts', 246, 'Feb 3 2003
12:00:00:000AM', 'p02062693446', 'test', '0203000085', 'test', 246
This screen in ADP simply times out. In SQL Server locks, I can see that
this connection is blocked by itself?! (how is that possible).
I run the same script in query analyser, the script completes under 1 sec.
Any idea what is going on?
I have a trigger on the underlying table that is being updated
CREATE TRIGGER ASAS_UPD_TAFE_HDR ON [dbo].[TAFE_HDR]
FOR UPDATE
AS
if exists (select * from master.dbo.sysprocesses where program_name like
'microsoft office%' and spid=@@spid)
begin
update
a
set
a.transdate=b.created_date,
a.ref2=b.enrolmentno,
a.x_enrol_id=b.enrolmentno,
a.ord_ref=b.ord_ref,
a.ref1=b.ref1
from
dr_trans a inner join inserted b on
a.jobno=b.seqno
insert into asas_audit
select
'Update Invoice Header',
system_user,
host_name(),
getdate(),
invno
from
inserted
end
I don't think it makes any difference. I have included it just in case if
anyone can spot any problem here.
Thanks in advance