Olivier_Desmars
Member
I have added a trigger to the structure of my database (Progress 9.1B). It really works well (the trigger only write into a log file to tell which record has been created or deleted).
But when I'm connected with a different logical name to the database (it means with a logical name that is different from the former one), the trigger does not work anymore.
Example 1:
----------
/* Connecting to the database */
/* with the former db logical name */
IF NOT CONNECTED("probase") THEN CONNECT -pf mybase.pf -ld probase.
/* Now playing with the trigger */
FIND FIRST probase.mytable.
DELETE mytable. /* the trigger write to the log file correctly */
/* This example works FINE in every situation */
Example 2:
----------
/* Connecting to the same database */
/* with the another logical name */
/* we are not connected to any database at this time */
IF NOT CONNECTED("probase2") THEN CONNECT -pf mybase.pf -ld probase2.
/* Now playing with the trigger */
FIND FIRST probase2.mytable.
DELETE mytable. /* the trigger does not occur */
Of course I've checked that the connection with a different logical name was working well , and that 'mytable' was not an empty table. Everything works well in Example 2, except the trigger.
So, I guess that the trigger is linked with probase.mytable and not with probase2.mytable, and that's why it doesn't work.
How could I make it work for any logical name (dont tell me to keep the former logical name, because I really need to use a different logical name).
Any help appreciated
Happy 31st December :wavey:
But when I'm connected with a different logical name to the database (it means with a logical name that is different from the former one), the trigger does not work anymore.
Example 1:
----------
/* Connecting to the database */
/* with the former db logical name */
IF NOT CONNECTED("probase") THEN CONNECT -pf mybase.pf -ld probase.
/* Now playing with the trigger */
FIND FIRST probase.mytable.
DELETE mytable. /* the trigger write to the log file correctly */
/* This example works FINE in every situation */
Example 2:
----------
/* Connecting to the same database */
/* with the another logical name */
/* we are not connected to any database at this time */
IF NOT CONNECTED("probase2") THEN CONNECT -pf mybase.pf -ld probase2.
/* Now playing with the trigger */
FIND FIRST probase2.mytable.
DELETE mytable. /* the trigger does not occur */
Of course I've checked that the connection with a different logical name was working well , and that 'mytable' was not an empty table. Everything works well in Example 2, except the trigger.
So, I guess that the trigger is linked with probase.mytable and not with probase2.mytable, and that's why it doesn't work.
How could I make it work for any logical name (dont tell me to keep the former logical name, because I really need to use a different logical name).
Any help appreciated
Happy 31st December :wavey: