Kbase P93649: How to copy new database table records to a file at the time of their creation?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  26/10/2004 |
|
Status: Unverified
GOAL:
How to copy new database table records to a file at the time of their creation?
FIX:
Use the WRITE database schema trigger to export (copy) the data of all new records to a file. The following sample WRITE database schema trigger copies the data of all newly created State table records to the file 'myfile.txt ':
TRIGGER PROCEDURE FOR WRITE OF State.
OUTPUT TO myfile.txt APPEND.
EXPORT state.
OUTPUT CLOSE.
Notice that the APPEND option of the OUTPUT TO statement above ensures that the new information does not overwrite the old one and that the information gathering is cumulative.