Can anyone point me to the magical field of the _File_Trig table that would eventually hold the value of the "Check CRC" toggle-box shown in the Data Dictionary/Table/Triggers view ?
So far, the only existing logical field seems to care of the Overridable aspect
Or of course you could have used the OF construct :-):
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig OF _File NO-LOCK
WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
BY _file._File-Name:
Hi Sebastein,
I think you missed " AND _File-Trig._File-Recid = RECID (_File) "
You do not take care of the table for the trigger
Regards
Patrice
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig NO-LOCK WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
AND _File-Trig._File-Recid = RECID (_File) /*<============= */
BY _file._File-Name:
DISPLAY
_file._File-Name
_File-Trig._Event
_File-Trig._Proc-Name
_File-Trig._Override
_File-Trig._Trig-Crc
WITH WIDTH 120.
END.
the _field-tri._trig-crc is the field you search
/* extract from the code */
(IF _Field-trig._Trig-Crc <> 0 AND _Field-trig._Trig-Crc <> ?
THEN yes ELSE no) @ check_crc
the _field-tri._trig-crc is the field you search
/* extract from the code */
(IF _Field-trig._Trig-Crc <> 0 AND _Field-trig._Trig-Crc <> ?
THEN yes ELSE no) @ check_crc
My question was about triggers defined for a table in _File-trig, like CREATE WRITE or DELETE, not for Field triggers (ASSIGN) in _Field-Trig
I just tried to query _file and _File-Trig this way, but the result includes table triggers that have the "Check CRC" option disabled. I mean, the value of _File-Trig._Trig-Crc is not 0 nor unknown:
CURRENT-WINDOW:WIDTH-CHARS = 120.
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig NO-LOCK WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
BY _file._File-Name:
DISPLAY
_file._File-Name
_File-Trig._Event
_File-Trig._Proc-Name
_File-Trig._Override
_File-Trig._Trig-Crc
WITH WIDTH 120.
END.
So this might be handled differently. Did I miss something?
see prodict/user/user-f.i
crc[i] = (if wfit._Trig-CRC = ? then no else yes)
and
wfit._Trig-CRC = (IF INPUT FRAME frame-f crc[i]
THEN new_crc_val[i] ELSE ?).
Hi Sebastein,
I think you missed " AND _File-Trig._File-Recid = RECID (_File) "
You do not take care of the table for the trigger
Regards
Patrice
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig NO-LOCK WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
AND _File-Trig._File-Recid = RECID (_File) /*<============= */
BY _file._File-Name:
DISPLAY
_file._File-Name
_File-Trig._Event
_File-Trig._Proc-Name
_File-Trig._Override
_File-Trig._Trig-Crc
WITH WIDTH 120.
END.
Or of course you could have used the OF construct :-):
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig OF _File NO-LOCK
WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
BY _file._File-Name:
Damned, indeed, I was using the OF operator in my initial piece of code, and I managed to drop it. This might explain that
For the records, this code lists the table triggers with Check-CRC enabled:
CURRENT-WINDOW:WIDTH-CHARS = 120.
FOR EACH _file NO-LOCK WHERE _file._Hidden = FALSE
,EACH _File-Trig NO-LOCK OF _file
WHERE _File-Trig._Trig-Crc <> 0 AND _File-Trig._Trig-Crc <> ?
BY _file._File-Name:
DISPLAY
_file._File-Name
_File-Trig._Event
_File-Trig._Proc-Name
_File-Trig._Override
_File-Trig._Trig-Crc
WITH WIDTH 120.
END.