CTTable::SystemFilterOn Establishes a permanent system wide data record filter. Declaration void CTTable::SystemFilterOn(CTSYSFILTER mode); Description Establishes a permanent system wide, i.e. the filter applies to all users, read and/or write record filter. Depending on server file security setting, the table must be opened exclusive and the user must have file definition permission for the table. Once a read or a write filter is established, it can only be deleted by calling method CTTable::SystemFilterOff(). A table may have at most one read and one write system wide filter. A write filter will be called when data records are added, updated or deleted. mode specifies one of the following:
System wide filters must be callback filters. The actual callback evaluation takes place in a new callback function ctfiltercb_rowl() located in module ctclbk.c. There different levels of security settings when users modify data file definition resources such as IFIL and DODA. The c-tree Server can be configured for three different levels of data file resource security: FILEDEF_SECURITY_LEVEL LOW: FILEDEF_SECURITY_LEVEL MEDIUM: FILEDEF_SECURITY_LEVEL HIGH: Return On error CTTable::SystemFilterOn() throws a CTException exception object. Example
{
// open an existing table hTable.Open("table_name", CTOPEN_EXCLUSIVE);
// establish a new system wide read-write filter hTable.SystemFilterOn(CTSYSFILTER_READ | CTSYSFILTER_WRITE); // close the table hTable.Close(); } catch (CTException &err) {
printf("Setting system filter failed with error %d\n", err.GetErrorCode());
} See Also CTTable::SystemFilterOff() |
|||