Subject Re: Trigger is not 100%
Author Aage Johansen
On Sun, 9 Nov 2003 04:41:44 +0000 (UTC), james_027 wrote:

>> If you don't trust your trigger, you can use an additional insert into an
>> 'external table' (with some relevant fields, plus
>> timestamp etc.). This should make it possible to track what happens.
>>
> Can you give me a detailed instruction on how can I do that?


Start with the manual describing
"CREATE TABLE table [EXTERNAL [FILE] 'filespec'] (<col_def> [, <col_def> |
<tconstraint> ...]);"
Note that Fb1.5 need permisions to create/write the external file/table -
see the Release notes.

You can insert into the external file/table like any ordinary
table. However, using only CHAR fields makes things easier! Add a field
to hold the EOL-marker (cr+lf for Windows).
create table BUGTRACK (
TRACKTEXT char(20),
EOL char(2)
);

In the trigger you should be able to set the EOL field like
EOL = '
';

Then insert into BUGTRACK with some relevant info in TRACKTEXT
field. Don't expect transactions or anything but INSERT and SELECT to work
on the external table.
The file ('filespec') will be an ordinary text file.

[I didn't test any of this, but I think you get the general idea]


--
Aage J.