Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Trigger validity
Sat, Dec 18 2010 5:07 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

I've just been going through my triggers updating them. I have two ways of figuring out which need updating. First read them through and see if I can spot the areas for change - hmmm. Second alter them (insert space, delete space) and try and save which is much better.

I don't know how often the syntax is liable to change but if it could happen again I'd love to see a way of listing the invalid ones built into EDBManager.

Roy Lambert
Tue, Dec 21 2010 3:58 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I don't know how often the syntax is liable to change but if it could
happen again I'd love to see a way of listing the invalid ones built into
EDBManager. >>

Not very often - this is the first time in almost 3 years, and I don't see
it changing again soon.

Unfortunately, due to the nature of triggers, there really isn't a quick and
easy way of grabbing them from the System information tables and executing
them.  Or, I should say, the grabbing part is easy, the executing part is
difficult due to the special OLDROW/NEWROW references.

I would start with a query like this:

SELECT * FROM Information.Triggers
WHERE Definition LIKE '%'+#13+#10+'FETCH%' OR
Definition LIKE '%'+#13+#10+'INSERT%' OR
Definition LIKE '%'+#13+#10+'UPDATE%'

That should find all of the cursor operations that need the new dynamic
column format.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Dec 22 2010 3:53 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Not very often - this is the first time in almost 3 years, and I don't see
>it changing again soon.

That statement will almost certainly come back to haunt you Smiley

>Unfortunately, due to the nature of triggers, there really isn't a quick and
>easy way of grabbing them from the System information tables and executing
>them. Or, I should say, the grabbing part is easy, the executing part is
>difficult due to the special OLDROW/NEWROW references.

Fortunately I don't have that many triggers right now and it gave me a push to move some to ALL type. Job done on one database and I saved the ! delimited SQL I ended up with and used it to alter the other databases.

Roy Lambert
Wed, Dec 22 2010 4:48 AMPermanent Link

Uli Becker

Roy,

> I've just been going through my triggers updating them. I have two ways of figuring out which need updating.

I did a reverse engineering of the whole database and searched for
"update", "fetch" and "insert".

Uli
Thu, Dec 23 2010 4:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I did a reverse engineering of the whole database and searched for
"update", "fetch" and "insert". >>

Duh, why didn't *I* think of that ? Wink

--
Tim Young
Elevate Software
www.elevatesoft.com
Image