Openedge Progress - Trigger on a table

Posted by mquintal on 13-Oct-2016 13:51


I create a "Trigger" on a table.

It works almost perfectly.

The part which doesn't work like I would, his that i need to make a display of  the data, otherwise it doesn't release the data.

I don't want to do a display,  Is there someone, who know how to solve this issue?


P.S.( Sorry, for my english but it's not my mother tongue)

All Replies

Posted by smat-consulting on 13-Oct-2016 14:57

Not sure I understand exactly what you are trying to do. Want to explain a little more?

As a basic guideline, NEVER use any user-interaction (message, display, pause,...) in a trigger. User-Interactions should be in the part of the program that deals with user-interface. That part shouldn't have database access.

That way, you can always add a different user-interface to the same backed, or exchange somethings on the backend without interrupting the user-interface...

I use triggers almost exclusively for data-integrity checks (see if foreign keys are valid, disallow delete if dependent record still round, cascade delete children with parents, and such). Whenever I did something else within the triggers it came back later and bit me in my seat-cushion ;)

Posted by mquintal on 14-Oct-2016 07:25

Hi Thomas,

It's true, I didn't say a lot.

Our main OpenEdge Progress is installed on LINUX. And I use Dataserver from Progress to interroge some data that are store into another Server(Windows) where SQL Server is installed.

In more détails, we have a machine from production, who write data into the SQL Server. I use Dataserver to consult the new data, when there is.  And I do some verification into the Linux side and write into the table SQL SERVER(Windows), my answer. (good or what is wrong).

So like I said previously, I put a trigger on one table ( who come from SQL SERVER but I see like mine into Linux).

The trigger that I create, is working almost at 100%. The only problem that I have, is that if I don't make a display (not into the trigger but a side), it doesn't write my answer into SQL.

I hope, it will help

Posted by smat-consulting on 14-Oct-2016 08:40

Data server adds a lot of complexity, as you're now dealing with two different systems and their interaction. Even though it is made so easy with OpenEdge, it still is a hassle!

Hm. I'd probably put some logic into the trigger that outputs the data I'm attempting to send to SQL Server into some sort of log-file just before it is written to that DB. That way I see that the record is actually there. and try to see if there is any returned message after that assign. Not sure if error-status is raised or maybe a catch block or so - just in case the foreign DB rejects the record for some reason...

Not sure what else I could suggest...

Good luck!

PS: if you like, find me on Skype and screenshare what you're observing. Maybe that might trigger some more ideas...

Posted by mquintal on 14-Oct-2016 09:35

Thanks Thomas for your help

This thread is closed