Kbase 15641: Using Multiple sets of R-code & -trig for DB Schema Triggers
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Using Multiple sets of R-code & -trig for DB Schema Triggers
INTRODUCTION
============
This knowledgebase entry describes one way to implement
database schema triggers for more than one database with
the same table names.
WHY YOU NEED TO KNOW THIS
=========================
If you are developing database schema triggers that are
not pre-compiled and are intended to be used for the same
tables in more than one database, the following error may
occur:
"Table <table> is in database <db name> and <db name>
(425)"
The help for this error message includes the following:
"You have given the name of a table that exists in at least
two databases that you have connected. You need to
qualify the name of the table with the logical name of the
database."
But, it is not possible to qualify the name of the table
with the logical name of the database in a schema trigger.
PROCEDURAL APPROACH
===================
You need to have separate r-code for each database that
will need the schema triggers. The -trig parameter can
then be used for each database to point to the appropriate
trigger code that has been compiled for that database.
So you essentially have one set of source code for the
database schema triggers and one set of r-code for each
database that uses those triggers.
REFERENCES TO WRITTEN DOCUMENTATION
===================================
Progress System Administration Reference
Progress Basic Development Tools
Progress Programming Handbook
Progress Software Technical Support Note # 15641