View Complete Post
What to do when you need to disable triggers and constraints to perform data synchronization and other tasks with an offline database.
MSDN Magazine April 2007
MSDN Magazine January 2004
MSDN Magazine December 2003
What is the reason for this restriction for Output clause?
If the OUTPUT clause is specified without also specifying the INTO keyword, the target of the DML operation cannot have any enabled trigger defined on it for the given DML action. For example, if the OUTPUT clause is defined in an UPDATE statement, the target
table cannot have any enabled UPDATE triggers.
Here's my scenario:
First, I have two servers. In Server1 I have set up a Linked Server to Server2.
I have two databases on Server1. The first is the Customer database and the second is my Staging database. Server2 contains a database called Gateway.
I have AFTER INSERT, UPDATE triggers on tables in the Customer database that will insert records into tables in my Staging database.
The triggers on the tables in the Staging database will insert records into tables in the Gateway database on the Linked Server, Server2.
OK ... that is the setup. Now, the problem:
As you all probably know (and I didn't know until I started working with this), the statement in the Customer database that caused the trigger to fire, enlists everything in a transaction. If there is a problem several hops away with accessing the LinkedServer,
then the entire thing is rolled back. IOW, the records in the table on the Customer database are never updated! This is bad (we can't mess with the functionality of our Customer's database, so our triggers there have to be fairly foolproof).
The trigger in the Customer database which INSERTS records into the Staging database should be ok and never fail (they are, after all, on the same Server). However, the trigger in the Staging database is where there could potentially be a problem if the
LinkedServer is do
I have a few buttons on a web page.
I have an update panel and I have 2 triggers that reference button 1 and 2 outside my update panel.
When I click on button 1 and 2 I want the update panel to "update" with content without a whole page refresh.
This seems simple enough but when I run I get the following error:
Here is my code.
<asp:button ID="btn1" Text="press me" Click="btn1_Click></asp:button>
<asp:button ID="btn2" Text="press me2" Click="btn2_Click></asp:button>
<asp:UpdatePanel ID="updateSomething" UpdateMode="Condtional" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btn1" runat="server" EventName="Click" /> <asp:
hi i wanto to control two properties value in a trigger. is it possible?
<Trigger Property="IsEnable" Value="true"
<Setter Property="MinHeight" Value="95" TargetName="DropDownBorder"/>
I want to Get Values from last updated row using Sql server Triggers.
what is the procedure 4 that (equivalent to NEW and OLD keywords in Oracle).
Plz reply me