triggers

PostgreSQL: How to execute an insert trigger without delaying insert response?

Does anyone knows how can I set up an insert trigger so when a perform an insert from my application, the data gets inserted and postgres returns, even before the trigger finishes executing? ...

Pass back original SQL operation row count, after trigger?

I have a piece of legacy VB6 code that is inserting data into a sql server 2000 database table. The code uses the row count returned for various purposes. We recently put a trigger on the table which calls a stored procedure to update another table. It now appears that the VB6 code is picking up the row count returned from the triggered...

WPF TextBox.Text with MultiBinding

Hi ! I've got Custom Control with a TextBox in the default Template. The Custom Control has these 2 dependency properties (among others): SelectedValue, NullText (text to appear in the TextBox when nothing is selected and the value is provided) I'd like to set the TextBox.Text with the NullText value when the SelectedValue null is and...

Is MySQL's trigger concurrent?

Can there be two triggers running at the same time? ...

Instead Of Triggers on Views - What's the Use Case?

Our production database is 5-7 years old, and many people have had their hands in it making schema modifications during this time. I just discovered there are Instead Of triggers on some of our views. I didn't even know this was possible. For those of you who have used Instead of triggers on views, what use case were you trying to solve?...

How to handle multiple rows in this Sql Server Trigger?

Hi folks, I have the following trigger, but because a trigger needs to handle multiple records, I'm not sure how to correctly handle this, in my trigger code. Can someone please suggest how I can change the TSql below to correctly handle multiple records, instead of just a single record (as is listed, below). Table Schema and defaults...

how we can delete record of a table when record of another table deleted using function,trigger in postgresql -concepts

how we can delete record of a table when record of another table deleted using function,trigger in postgresql -concepts ...

jQuery - Trigger event when an element is removed from the DOM

Hi - I'm trying to figure out how to execute some js code when an element is removed from the page: jQuery('#some-element').remove(); // remove some element from the page /* need to figure out how to independently detect the above happened */ is there an event tailored for that, something like: jQuery('#some-element').onremoval( func...

POI: column-wide trigger

I am new to apache.POI and I cannot find the way to generate a xls file using only POI which implements the standard Excel feature Conditional Formatting -> Highlight Cell Rules -> Duplicate Values. All I can do is to create a certain amount of Conditional Formatting Rules and bind them to a fixed number of cells (e.g. 200). This will ...

Using default values in an INSTEAD OF INSERT trigger

We are performing a database migration to SQL Server, and to support a legacy app we have defined views on the SQL Server table which present data as the legacy app expects. However, we're now having trouble with INSTEAD OF INSERT triggers defined on those views, when the fields may have default values. I'll try to give an example. A ...

SQL User in trigger?

In my Delete trigger I need to know the username of the person deleting the record. Is there a SQL function or variable for that? ...

Change Image OnMouseOver in ControlTemplate

Here is my XAML: <Style x:Key="ExpanderStyle" TargetType="{x:Type ToggleButton}"> <Setter Property="IsEnabled" Value="True" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Image Source="/Images/SHCalendarLeftArrow.tiff" /> ...

Style expander buttons of TreeView

Here is my XAML: <Style x:Key="ExpanderStyle" TargetType="{x:Type ToggleButton}"> <Setter Property="IsEnabled" Value="True" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Image Source="/Images/SHCalendarLeftArrow.tiff" /> ...

How to group data changes by operation with MySQL triggers

I am using triggers in MySQL to log changes to the data. These changes are recorded on a row level. I can now insert an entry in my log table for each row that is changed. However, I also need to record the operation to which the changes belong. For example, a delete operation like "DELETE * FROM table WHERE type=x" can delete multiple...

MySQL Trigger only for a certain mysql user

I'm trying to find out if a specific MySQL User is still in use in our system (and what queries it is executing). So I thought of writing a trigger that would kick in anytime user X executes a query, and it would log the query in a log table. How can I do that? I know how to write a query for a specific table, but not for a specific us...

set up a data trigger on physical address

Hi, Do you know any device out there can set up a data trigger on a physical address in MIPS ? I am using FS2 but It can only set up a trigger on virtual address. ...

Create Insert Trigger for SQLAgentMail

Is it possible to create a trigger the will use SQLAgentMail and email an operator? ...

TSQL update trigger: joining inserted and deleted

I have an on update trigger in SQL Server 2008. I only need to perform the trigger action if certain columns have been modified. Thus I'd like to check what has changed. T-SQL offers an "if update( columnName )" construct. However, if many rows have been updated and only a single one of them has the particular column value changed "if...

SQL Server Trigger loop

Hi, I would like to know if there is anyway I can add a trigger on two tables that will replicate the data to the other. For example: I have a two users tables, users_V1 and users_V2, When a user is updated with one of the V1 app, it activate a trigger updating it in users_V2 as well. If I want to add the same trigger on the V2 table...

Oracle - Triggers to create a history row on update

First, we currently have the behavior that's desired, but it's not trivial to maintain when any changes to the database are needed. I'm looking for anything simpler, more efficient, or easier to maintain (anything that does any of those 3 would be most welcome). When we perform an update, a history row is created that is a copy of the ...