trigger location

will

New Member
Hi

I created a DB and create triggers using the data dictionary. The trigger files were created in "c:\drive\trig\trig-name.p".
When remote client connects to the DB - the remote session looks for the trigger in "c:\drive\trig\trig-name.p".

I have tried using the -trig startup parameter to point to a mapped drive on the DB machine I have tried putting the triggers in a library - with and without the "c:\drive\trig" path - But still message from remote machine ""c:\drive\trig\trig-name.p was not found"

Please help to put me out of my misery.....
 

BONO

Member
Hello,
U're problem is simple, u've to enter the trigger name sith only it's relative path. For example trg\<triggername>, the directory who contains trg must be in the propath .


Hope it's help
 

will

New Member
Hi thanks but
maybe i must explain the layout DB with application code/ trigger code is sitting on the server and a remote client connects by mapping a drive on the DB server - How/were exactly should I specify the reletavie path for the triggers On the client side "-trig mapped-drive\trig" ? On the server side ?
 

BONO

Member
hello,
trigger are program like other and have to be available from the path specified by the client connection setting. For example our bdd are stored on different area on server. The client connect to db with parameter file and .ini. No -trig on parameter file but a propath on the progress.ini who let available the trigger location. Perhaps with -rig you can affect anoter path for trigger but i don't see why it willbe interesting. Store source code from two path ?
 

will

New Member
Thanks for he interest but this is turning out to be a bad one

The trigger location is in the propath -

On remote client machine if I do 'message search("trigname.p") it replies with "mapped_drive\trig\trig_name.p" where "mapped_drive" is a drive on the db server.

BUT when the trigger is executed on the remote machine from the progress application the message comes up "c:\trig\trig-name.p was not found "- How can I force the remote client to look for the trigger on the Server ( mapped drive).

Like I said before the triggers were created using the Data Dictionary (database schema triggers) where the trigger file name was set to "c:\trig\trig-name.p" And no matter what I do all remote clients look for the trigger code in this directory "c:\trig\trig-name.p" but the bugger must look for the trigger on "mapped-drive\trig\trig-name.p"

This is the response from Progress_Guy which looks to be accurate but without a quick and easy solution for me though....

"You'll struggle I'm afraid.

Triggers execute on the client running the code. i.e. if your client is a PC remotely connecting to a database on another server then the client will try and execute the triggers on itself - they WILL NOT execute on the remote server.

This is a particular problem when remotely connecting to databases which were originally written as CHUI and had the application code always sat on the same server as the databases. - this usually emerges when porting old CHUI applications to GUI, WebSpeed, etc.

I can only suggest either :

1. copying the trigger code to the client machine
2. disabling triggers (on client code), e.g. DISABLE TRIGGERS FOR LOAD OF tablename
3. removing the triggers off the database schema

Personally I avoid triggers for a number of reasons including the one you are experiencing. I used to hate this behaviour, but, I now dislike the idea of having code excute automatically on a database and only do it when I must do, e.g. generating audit records, etc. Triggers do initially seem a super idea, but, I'm not keen. I'm sure now that you'll get zillions of replies to this slating me for saying this - lol :)

Anyone else there got any thoughts of a slightly less negative nature than mine ??
"
 
It looks to me as though the triggers locations must be stored on the database schema with the "C:\" hard coded.

If this is the case, you should change the database schema so that the triggers are identified by a relative path.
If the trigger directory is in your PROPATH or you have identified the trigger directory using -trig, you need only have the trigger's filename on the schema.

From the AppBuilder..
Tools / Data Dictionary
Select the Table and press "Table Properties"
Press the "Triggers" button.
Select the appropriate trigger and amend the procedure name.

Hope this helps
 
In the data dictionary the trigger file should be "trig\trig-name.p"
The propath should include "c:\drive", or -trig "c:\drive" to extented the propath ,
 

will

New Member
Stop the clock we have a winner .

Thanks Norman works like a charm I learn something new every day.
 
Top