Page 1 of 1

Triggers

Posted: 08.02.2008, 10:47
by sandeep_c24
Hi Mark

There seems to be no way of getting Triggers using TZSqlMetadata. Following is the TZMetadataType declaration and there is no mention of Trigger. Should this be extended to support Triggers?

Code: Select all

  TZMetadataType = (mdProcedures, mdProcedureColumns, mdTables, mdSchemas,
    mdCatalogs, mdTableTypes, mdColumns, mdColumnPrivileges, mdTablePrivileges,
    mdBestRowIdentifier, mdVersionColumns, mdPrimaryKeys, mdImportedKeys,
    mdExportedKeys, mdCrossReference, mdTypeInfo, mdIndexInfo, mdSequences,
    mdUserDefinedTypes);
Regards

Sandeep

Posted: 08.02.2008, 11:32
by mdaems
It could be, but maybe they are already returned as Procedures by some database servers. But even then, a 'mdTriggers' option could be usefull.
Can you design a resultset structure?

Mark

Posted: 09.02.2008, 06:06
by sandeep_c24
I propose following structure

1. Trigger Name
2. Table Name
3. Trigger Source
4. Active (I think this is only in Firebird)
5. Event

I am not sure if event should be selected as a separate column.

What do others think?

Regards

Sandeep

Posted: 09.02.2008, 20:32
by mdaems
Event may be difficult to extract depending on the database. On the other hand, if it's possible it's nice to have separately. I would say: go for it.