Is there a way to use EF without transaction? I have very simple single insert and don't want to roll-back when something goes wrong as there may be a trigger logging then raising error from the DB side which I have no control over. I just want to insert then catch any exceptions but don't want to roll-back.
...
Hi all,
Just a quick question that no doubt someone out there will know the answer to.
I need to be able to do multiple insert/updates within a trigger. Every attempt ends with failure :(
DROP TRIGGER IF EXISTS `Insert_Article`//
CREATE TRIGGER `Insert_Article` AFTER INSERT ON `Article`
FOR EACH ROW insert into FullTextStore (`Table...
Hello all,
We are creating a system in Ruby on Rails and we want to be able to offer our users a bit of control about notifications and actions that can take place when some pre-defined trigger occurs. In addition, we plan on iterating through imported data and allowing our users to configure some actions and triggers based on that data...
Hello
I have an organizational database where in it each employee have a foreign key to it's boss(FID).
Table declaration:
Create Table Emp(
ID integer,
FID integer,
SALARY integer,
Primary key (ID),
foreign key (FID) references EMP
);
The following sql trigger should update the employees under a boss. And then ...
Hi everyone,
A while ago i read the article for Trigger in SQL Server, and it said that i can use the Logical Table "Updated" for updated rows... And i got error:
System.Data.SqlClient.SqlException: Invalid object name 'Updated'.
After a while of google, i found out some more post that said only 2 logical tables available are: Insert...
Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.
What should be the workaround in this case? :(
...
Hi, just having some headaches implementing something in a trigger on a old version of Sybase and wondered if anyone could help. In a nutshell, I want to write a trigger that will call another sproc for each of the affected records (whether it be inserted, deleted or both [updated]).
One way to do this in T-SQL (SQL Server) would be to ...
I am trying to find impact of doing DDL statement against deleted and inserted logical tables inside table trigger. I have:
CREATE TRIGGER [Trigger52]
ON [dbo].[Table1]
FOR DELETE, INSERT, UPDATE
AS
BEGIN
create table inserted (c1 int)
select * from inserted
END
When it is triggered, I expected to g...
I have a table named user. This table has a foreign key to a department table. One user can be associated with one department. Before deleting a department, I would like to set any user (having that department ID) to a default value (1) to avoid a referential integrity error.
Do you know a good example. Most examples shows that the trig...
Here is my query (from a trigger):
UPDATE QuoteItemsGroupFeature
SET Cost = (QuoteItemsGroup.BaseCost + QuoteItemsGroup.AccumulatedCost +
ISNULL(SUM(ParentQuoteItemsGroupFeature.Cost), 0)) * INSERTED.Amount
FROM QuoteItemsGroupFeature INNER JOIN INSERTED
ON QuoteItemsGroupFeature.QuoteItemsGroupFeatureId =
INSERTED.QuoteIt...
I need to implement change tracking on two tables in my SQL Server 2005 database. I need to audit additions, deletions, updates (with detail on what was updated). I was planning on using a trigger to do this, but after poking around on Google I found that it was incredibly easy to do this incorrectly, and I wanted to avoid that on the ...
How Can I know if the DataGridCell is currently in edit mode (not IsSelected), I mean, for example a DataGridTextColumn cell is clicked it becomes a TextBox and not a TextBlock, that's what I call IsEditMode.
I wanna set a trigger-setter for this mode.
EDIT:
I tried to set a general style for DataGridCell.IsEditing but it doesn't seem t...
Can we manage UDFs, and triggers in Derby database from our own Java Application ?
By managing I mean :
checking if it exists;
adding;
removing.
...
Hai guys,
Is it possible to add multiple controls(Buttons) to PostBackTrigger's ControlId property inside a single update panel....
...
Apologies for this trivial question, I'm new to WPF and keep finding blogs that almost describe what I want...
I have a Label that is bound to a property and updating nicely on screen, and now I'd like a small animation that flashes the background colour of the label whenever the value is updated. Ideally I'd like a pure xaml solution
...
Hi,
Here is my myFaces Code the
<tr:commandButton text="Calculate Modulus" action="#{pageManager.form.calculateModulus}" id="modulusCalculation" partialSubmit="true"/>
<tr:table value="#{pageManager.form.modulusCollection}" var="modulus" width="75%"
inlineStyle="align:center;" partialTriggers="modulusCalculation" autoSubmit...
I have a mysql trigger that logs every time a specific table is updated.
Is there a way to also log WHICH PHP SCRIPT triggered it? (without modifying each php script of course, that would defeat my purpose)
Also, is there a way to log what was the SQL statement right before the UPDATE that triggered it?
Thanks
Nathan
...
Almost in all stages of my application, the database inserts / updates / deletions are done by the application code (in my case, PHP).
However, in some situations, I am using MySQL triggers to do some calculations and changes to the tables.
Is this a recommended approach? Or is there any best practice rule that only the application sho...
Hi folks,
Firstly, this DB question could be a bit DB agnostic, but I am using Sql Server 2008 if that has a specialised solution for this problem, but please keep reading this if you're not an MS Sql Server person .. please :)
Ok, I read in a log file that contains data for a game. Eg. when a player connects, disconnects, does stuff...
I have a number of tables that use the Postgres "Partitioning" feature. I want to define a common BEFORE INSERT OF ROW trigger on each table that will 1) dynamically create the partition should the insert occur against the parent table and 2) re-execute the insert against the partition.
Something like:
CREATE OR REPLACE FUNCTION parti...