triggers

WPF Trigger and StoryBoard Blues

Hi there. I'm having some trouble with making triggers do what I want them to... I have a control that needs to have a contextual menu and a checkbox appear when you mouse over them. Only thing is if the checkbox is checked it should remain visible. Basically I have 4 storyboards - two to show/hide the checkbox, and two to show/hide ...

Writing Triggers or implementing actions by programming?

I am a newbie. I am writing an application in Java which connects to Oracle 9i database. I need to enforce some rules in my application like: Chair of Committee A must be added/deleted as a Member in Committee B. There are around 10 such rules that need to be enforced. I am in a dilemma whether to enforce these rules by writing trigger...

How to trigger an event at 03:00 every night?

How is this done best? I want an app that's running on a server to trigger an event every night at 03:00. ...

How do I diagnose steps in a trigger on MySQL

I have two tables: source table result table I have an after update trigger on my source table which updates some records in result table. the problem is, my trigger is not updating result table and I would like to diagnose my trigger execution. I tried putting select statements to see variable values but selects are not allowed in ...

How to add asyncPostBackTrigger to Template column, Item Template, Button in DataGrid

I need to add a trigger for two buttons in DataGrid Template columns. I have found a couple postings saying to put the code in the code-behind using the UniqueID. Something isn't right with my logic (or maybe it isn't in the right place). I am getting "Object reference not set to an instance of an object" error when I run it. I am g...

Use ComboBoxItem text as value for a Property Setter

Hey guys! Here is the deal... I have a ComboBox defined in my window. The content of this comboBox, is only a string list with all values in Brushes class. Nothing special so far... But what I'm trying to achieve is a way to change the combobox background color when the user changes the color. The color would be the value selected in t...

Using Trigger to get ID on Insert - SQL 2005

I have a table (table_a) that, upon insert, needs to retrieve the next available id from the available_id field in another table (table_b) to use as the primary key in table_a, and then increment the available_id field in table_b by 1. While doing this via stored procedures is easy, I need to be able to have this occur on any insert into...

Tree data in MySql database table

I have a table that uses Adjacency list model for hierarchy storage. My most relevant columns in this table are therefore: ItemId // is auto_increment ParentId Level ParentTrail // in the form of "parentId/../parentId/itemId" then I created a before insert tigger, that populates columns Level and ParentTrail. Since the last column al...

How to alter a DateTime field when it is updated?

Is there a database level function (trigger or something) that I can use to alter a DateTime field when new data is inserted? The issue is that a service I am integrating with happens to send out all of its times (in this case the time some info was received on their end) in GMT. I need to automatically change this to reflect the time ...

SQL Server trigger doesn't fire when a record is inserted from ASP.NET web page

Hi Gurus! I have a wierd problem. I am having a web application developed in ASP.NET, the database is SQL Server Express 2005. I have written a trigger which updates another table's column value when a record is inserted or update. The two tables are InvtVendorInvoices (The trigger is on this table, trigger name is OnAlter_Ve...

Is a trigger what I need?

I am just back in the field after 5 years and am very rustly so please be patient. I am working on sql server express and I need to capture new/updated records(only parts of them actually) from a single table in order to insert into another table. (I will be using this other table as my data source for a crystal report.) I have no test...

Need help with SQL join to a function

Hello! I am trying to enter the following to an UPDATE trigger of QuoteItem: UPDATE QuoteItem SET List = StyleItem.List, CostFactor = StyleItem.CostFactor, Cost = NULL FROM dbo.fn_GetQuoteItemListPrice(QuoteItem.ItemId, QuoteItem.RoomId) AS StyleItem CROSS JOIN (QuoteItem JOIN INSERTED ON QuoteItem.QuoteItemId = INSERTED.Quot...

Can a PHP app run when email is sent?

Is there a way to configure a server or a script to execute a php script when an email is received? In theory this could be extended to other protocols, such as XMPP or SMS, etc. What I have in mind is a user could send a message to [email protected] and this would trigger a script which would then do whatever needed to be done, ...

Underline Text in Label which is in a DataTemplate

Hello, i have a ListView which contains objects bound from an collection. The representation of the objects i have set with data-template. Now i want to do the following. There are two TextBlocks in my DataTemplate: <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}"></TextBlock> <TextBlock Text="{Binding Path...

Fun with Database Triggers and Recursion in RDB

I had a problem this week (which thankfully I've solved in a much better way); I needed to keep a couple of fields in a database constant. So, I knocked up a script to place a Trigger on the table, that would set the value back to a preset number when either an insert, or update took place. The database is RDB running on VMS (but i'...

What table is used in an update trigger?

In an insert trigger I use table 'INSERTED' to get the inserted values. Do I use same INSERTED table in update trigger as well, or here comes in an 'UPDATED' table? ...

Salesforce: Trigger that fires off a Workflow rule has stopped working - any ideas?

So in one part of our customised Salesforce system, the following happens: a trigger changes the value of a picklist on a custom object a Workflow rule detects that change and fires off an email. Since about the 4th of December though, it seems to have stopped working. edit: The Debug Logs show that the trigger is firing and changing...

Determining sql command type in the trigger in sql server 2000

Is there more recomended way of determining command type in the trigger then testing DELETED and INSERTED tables? Currently i'm using approch: (EXISTS (select 1 from INSERTED) AND NOT EXISTS (select 1 from DELETED)) = INSERT (EXISTS (select 1 from INSERTED) AND EXISTS (select 1 from DELETED)) = UPDATE (NOT EXISTS (select 1 from INSERT...

How to have AJAX trigger the browser's loading

Ok. I'm making an ajax-enabled lab scheduling program, and some of the ajax operations aren't exactly quick. In Gmail, when you go to your inbox, send a message, etc. the browser acts like it's loading (In FF the stop button becomes enabled, the progress bar appears), but it's not on a new page, it's done via AJAX. How do they do this? I...

Dynamically added glow effects to UIElement using triggers

Hey, Im new to wpf, and looking for good tutorials to help understand triggers better but im not having much luck. So i thought I would seek some help here. Here is what im trying to do, i have a ScrollViewer that has a stack panel, in the code behind I browse a media folder and added MediaElements to the stackpanel using a foreach loo...