Table Trigger - TER

pianosynth

Reputable Poster
We have a perplexing (to me) situation. Our Media Objects are stored on a network drive (not on the DS) and occasionally the login script doesn't properly map the drives. When an attempt is made to view attachments without the proper drive, the record for the attachment is deleted from the F00165. In an attempt to be able to easily recover from this situation, I created F5900165 with all of the same fields, keys, indices, etc. as found in the F00165 and then generated and checked in the table. I then launched Table Trigger Design Aid for the F00165 and put a TER in the Before Record is Inserted section to insert any new records into the custom table. The trigger appears not to fire. So, I tried moving the TER to the After Record is Inserted section... same thing. I've searched the List and KG and got the idea to add M & D debug to the TER... it doesn't launch. I've also tried logging out after generating the triggers as well as deleting glbltbl .ddb and .xbd. The trigger still won't run! Argh! This shouldn't be that difficult. Am I missing something simple? Any and all suggestions welcomed since I'm fresh out of ideas. TIA
 
Here are a couple of quick things to check. Did you click on the "Build Table Trigger" button? Check the time stamp on the JDBTRG1.DLL. Is it showing the date and time you actually built it?
|
|
 
Thanks for the response, Scott. I did check the date on the jdbtrg1.dll and it had the correct date/time stamp. Any other ideas?
 
Insert trigger should run on Enterprise server. As much as I know M&D cannot send message from Enterprise server to client session. Did you try with full Enterprise package? Or just use DB trigger (pre-delete) and you won’t have do any package.

Hope this helps,

Bojan.
 
Gee, how to debug a table trigger...

Here's a fairly easy debugger - you can put in anywhere.

Create a custome table containing NN, Time Stamp, Program ID and a large text field.

In your TER/NER/Function/Application/Whereever - get the NN from a custom (one that the Developers can reassign), and insert the NN, Time Stamp, Program ID and some custom text (something like, "Insert from Line 50 of N55OLFX")...

This will allow you to track if the TER/NER/Function... actually hits the Insert. Once the you've finished debugging - remmeber to remove the insert.

I once had a NER that I could call - that did everything, I just had to move the custom text into the text variable... made debugging quite easy.

I can provide source/example if there is a great calling for it.

Daniel
So, where are those great jobs in 2004?... I want to play something other than Daddy Day Care (actually DDC is the funnest thing I have ever done!)...
 
Pianosynth,

I just finished working on some table triggers and thought I would throw one on the F00165 to see if I got something different. I also could not get the update to trigger. Then I thought to myself - Well, the actual update of the table is from that weird screen, so maybe the trigger needs a true OneWorld update. So I tried performing a Table IO F00165.Update surrounded by MD Debugs. The table trigger MD Debug still did not fire, so maybe they do something special with certain tables?

I know confirmation of something 'not happening' is not what you want to hear, but I thought this might trigger some other suggestions/ideas.

Ben again
 
This approach is ALSO very, _very_ helpful when trying to debug HTML.
 
Bojan, I built and deployed a pkg to the ES, no difference.

Ben, thanks for your insight. Maybe it just isn't possible with this table?

Daniel, I had a similar idea, but instead of the table stuff I put in a Send Message in the TER. A msg is never sent which is what lead me to the suspicion that the trigger was never firing. I even went as far as to question whether I had the format correct for Send Message, so I put in a Execute Extarnal Command and put c:\winnt\system32\cmd as the app to run. No DOS window popped up!

Great ideas, all, but the problem persists. Any other ideas?
 
Charles,

I suspect Ben is right and this table is a special class which cannot use TER table triggers - perhaps because of the text BLOB field in it.

You can still setup a Database level trigger - which is probably a better solution anyway for what you are trying to accomplish.

Regards,
 
Sure, one more idea... put the insert to the debugger table before the insert to the table trigger - to make sure that it is actually being updated...

just a thought
 
Just to give my two cents on Gene's reply about HTML: we are currently experiencing unexpected behavior on HTML and 90% of the times we found out that the objects that we've changed were not properly included into the packages or updated into the WEB server (due to mistakes or flops from the CNC people).

Therefore, we've created a NER that does nothing and then everytime we change something we call this NER and passa a message flag (usually the ID to the rework assignment that originated the change) just to be able to check it in the server log files and see if the correct object was updated properly.
 
Back
Top