actually i have developed an application which converts XML data recieved
through email into database format and stores it into database
automatically without any human intervention.
When Insertion is automatic trigger does not fire but i need it to be
fired.
when i manually insert record in the table the trigger fires.
how can i have the trigger fired in case of automatic insertion
the code of trigger is as follows:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE TRIGGER [trig_addIncident] ON dbo.Incident
FOR INSERT
AS
DECLARE @newBug VARCHAR(100)
SELECT @newBug=(SELECT IncidentID + ' ' Subject FROM Inserted)
--print the detail of new Incident
PRINT 'New Incident " ' + @newBug + ' " added. '
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
[quoted text, click to view] "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message
news:pbdu42p5rs219vu3fo9sbl3cnc0ssldef0@4ax.com...
> On Wed, 26 Apr 2006 14:27:00 +0530, "sachin bhayana"
> <sachinbhayana@abosoftware.com> wrote:
>
>>I have attatched a trigger with the insertion of a table but when i insert
>>into the table the trigger is not fired.
>
> Hi,
>
> Some additional information would be useful.
>
> For example are you using SQL Server 2000 or SQL Server 2005? Can you
> show us the code for your trigger?
>
> Thanks
>
> Andrew Watt [MVP]