Hi,
you can un SET CONTEXT_INFO with ADO. normally I write a SP to set
CONTEXT_INFO, say SP_SC, then you can add a call to it before your delete
statement:
con.execute "SP_SC 'some info';Delete from mytable;SP_SC '' "
and then in trigger I read CONTEXT_INFO (see samples in SQL server BOL) and
decide if I run it or no.
Also you can create a table, with some flag, then you can set this flag, run
delete and reset it. this is much more easy, also to read it in trigger.

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"Jose Antonio Silva" <JosAntnioSilva@discussions.microsoft.com> wrote in
message news:281FFB46-2E53-45C1-B27B-EF5C4119C154@microsoft.com...
> Hello,
>
[quoted text clipped - 21 lines]
>
> Jose Antonio Silva
José António Silva - 27 Sep 2005 00:20 GMT
Thanks Alex,
I’m quite decided to create a temporary table to solve this problem.
However, I’m not sure how to test for the existence of a temporary table in
a trigger.
I’m doing the following:
IF EXISTS (SELECT name FROM sysobjects
WHERE name = '#tmp' ) SET Flag=1
but it seems to be not working.
José António Silva
> Hi,
> you can un SET CONTEXT_INFO with ADO. normally I write a SP to set
[quoted text clipped - 34 lines]
> >
> > Jose Antonio Silva
Alex Dybenko - 27 Sep 2005 15:37 GMT
Hi,
why do you use temp table? you can just make a normal table, and set/rest a
flag in it

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"Jose Antonio Silva" <JosAntnioSilva@discussions.microsoft.com> wrote in
message news:878F6337-4D31-470D-97DC-6A386344ACFD@microsoft.com...
> Thanks Alex,
>
[quoted text clipped - 56 lines]
>> >
>> > Jose Antonio Silva
José António Silva - 28 Sep 2005 12:55 GMT
I want to use a temporary table because I want the trigger to do nothing just
in one connection – the connection that previously created the temporary
table. Because the temporary table is not visible outside the connection that
creates it, in other connections the trigger will fire normally.
I can successfully select a value, let’s say a flag, from the temporary
table and from code in the trigger. However I cannot use this procedure for
nothing because when the temporary table doesn’t exist I get a run-time
error. So, I really have to test for the existence of the temporary table.
José António Silva
> Hi,
> why do you use temp table? you can just make a normal table, and set/rest a
[quoted text clipped - 60 lines]
> >> >
> >> > Jose Antonio Silva