I've created quite a satisfying 'magnifying glass' effect on a list view
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="FontSize" Value="14"/>
</Trigger>
However, what I'd really like to do is have the rows above and below set to, say, 12.
I suspect this is asking a bit to much, but just in case anyone has an ide...
I used Mike Swanson's illustrator to xaml converter to convert some of my images to xaml.
The convert creates a viewbox that contains the image. These viewboxes I made resource files in my program.
The code below shows what I'm trying to do: I have a viewmodel that has an enum variable called PrimaryWinding of type Windings. The values...
Hi all... I've long been waiting for BEFORE triggers. But we have some systems which are written in ORACLE. When a potential new client asked why, our president told them that it was because there are no BEFORE triggers in Sql Server (among other things).
To this, the client responded, "Yes, in 2008 you CAN write BEFORE triggers."
No...
I'm trying to set up a series of history triggers to automatically collect history for a given table via triggers. I want to use triggers as this guarantees I capture all changes regardless if someone forgets about saving it in the app. My problem is that I have this trigger.
CREATE TRIGGER `db`.`delete_history_trigger` BEFORE DELETE ON...
Using the "Northwind" sample:
I would like to create an insert trigger on the OrderDetails table so that every time an OrderDetail is inserted, it gets the current value of the UnitCost as defined in the Products table.
It should be something like this, but I have trouble to get it right. Can you help ?
CREATE TRIGGER Trigger1
ON Ord...
When writing a row-level trigger in Oracle, I know that you can use the OLD and NEW pseudo-records to reference the old and new state of the row that fired the trigger. I know that in an INSERT trigger OLD doesn't contain any data, but I'm not sure how this affects the evaluation of a WHEN clause for that trigger. For example, if I have ...
How could i create a trigger that at any insertion on my table [users] will change automatically the content of its [password] field to its MD5 hash?
Ps: I do not want this being done at client side.
...
I have below trigger
ALTER TRIGGER [dbo].[DeleteUserData]
ON [dbo].[site_users]
AFTER DELETE
AS
BEGIN
SET NOCOUNT ON;
--delete user uploads
update my_gallery set deleted=1 where un=(select un from deleted) and subdomain=(select subdomain from deleted)
--delete user pms
delete from pms where toUn=(select un from deleted) and subdomai...
I want to create one proc like below but it has error on syntax.
Could anyone pointing out the problem?
Create PROCEDURE [dbo].[my_proc] AS
BEGIN
DISABLE TRIGGER dbo.tr_name ON dbo.table_name
-- some update statement
ENABLE TRIGGER dbo.tr_name ON dbo.table_name
END
** Error Message : Incorrect syntax near 'ENABLE'.
...
Hi!
I have a (clearcase) preop non-interactive trigger that needs to evaluate an environment variable value (from client side) in order to perform some checks.
Is there a way or w/a to pass such environment variable value from client with CCRC to the trigger, considering it seems to do not work as with dynamic or snapshot view?
Thanks...
I seem to be seeing a lot of messages like this in my log:
Trigger DEV."MBR_TRG" was disabled before the load.
Trigger DEV."MBR_TRG" was re-enabled by another process.
SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified
Thi...
I've got an after insert trigger that works good.
However, I want it to delete the row after it's been inserted and after the main body of the trigger completes.
How can I do that?
I have a unique id in the table.
...
Hi all.
I have a WCF service that needs to notify it's clients when changes occur to the database (sql server 2005). This is relatively easy accomplished, as long as I find a way to notify my service of any changes. I can probably create a database trigger on a table and have that trigger start a small service client that notifies my se...
Hi,
I have a table, department , with several bit fields to indicate department types
One is Warehouse (when true, indicate the department is warehouse)
And I have another table, ManagersForWarehouses with following structure:
ID autoinc
WarehouseID int (foreign key reference DepartmentID from departments)
ManagerID int (foreign key r...
For the sake of the example, consider a table
create table foo (
contents text NOT NULL,
is_active boolean NOT NULL DEFAULT false,
dt_active date
)
I insert a record:
insert into foo (contents) values ('bar')
So far, so good. Later on, I now want to 'activate' the record:
update foo set is_active = true
What I would like t...
trigger:
CREATE TRIGGER "tr_update_ts" BEFORE INSERT OR UPDATE
ON "public"."test" FOR EACH ROW
EXECUTE PROCEDURE "public"."update_ts"();
and the function is:
CREATE OR REPLACE FUNCTION "public"."update_ts" () RETURNS trigger AS
$body$
DECLARE
BEGIN
NEW.ts := now();
RETURN NEW;
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON ...
In MySQL (particularly InnoDB) is there any way to know which tables were affected (updated / deleted rows) by CASCADE UPDATES / DELETES or regular triggers?
...
In oracle I can specify the columns, which should induce a firing of a trigger:
create or replace trigger my_trigger
before update of col1, col2, col3 on my_table for each row
begin
// the trigger code will be executed only if col1 or col2 or col3 was updated
end;
Now I want to do the following: I don't want the trigger to fire, whe...
I've got a trigger in a sql server table. This trigger has disappeared. Is there something systematic that might be causing it to be deleted?
There is no replication on this db.
...
OK, I have a table with no natural key, only an integer identity column as it's primary key. I'd like to insert and retrieve the identity value, but also use a trigger to ensure that certain fields are always set. Originally, the design was to use instead of insert triggers, but that breaks scope_identity. The output clause on the insert...