Defining New and Old Buffers in a WRITE Trigger

Posted by Admin on 18-Mar-2009 16:36

Hi All,

It's been a while since I've done this but it was possible about 10 years ago to define the new and old buffers to compare them for changes in a DB WRITE trigger. I don't remember the syntax anymore and I can't find it in the online help. Can anyone refresh my memory?

Thanks,

Dave

All Replies

Posted by Admin on 18-Mar-2009 16:39

[ BUFFER ] [ OLD ]]>[ BUFFER ] ]]>

so

Posted by Admin on 18-Mar-2009 16:59

Mike,

I tried both of the following syntax and I'm getting compile errors from both:

OLD bufOld.

NEW bufNew.

or

OLD BUFFER bufOld.

NEW BUFFER bufNew.

I'm using 10.1B03, was this syntax deprecated from the language in some previous version?

Dave

Posted by Thomas Mercer-Hursh on 18-Mar-2009 17:08

I see periods in your code, but none in Mike's or in the manual. One period only at the end. Try that.

Posted by Admin on 18-Mar-2009 17:08

Never mind, I got it. The syntax is pretty particular about naming conventions and the order that they are defined in. The following works for me:

TRIGGER PROCEDURE FOR WRITE OF RevCode

/* New and Old Buffer Definitions */

NEW BUFFER new_RevCode

OLD BUFFER old_RevCode.

Thanks for your help,

Dave

Posted by Admin on 18-Mar-2009 17:11

That was exactly the problem. The naming has affect and I was able to define them in either order.

Thanks,

Dave

Posted by Admin on 18-Mar-2009 17:13

Sorry, that was backwards. The naming doesn't matter but if the OLD is DEFINED before the new it creates an error.

This thread is closed