CString GetValidationRule( );
throw( CDaoException, CMemoryException );
Return Value
A CString object that validates the data in a field as it is changed or added to a table.
Remarks
Call this member function to retrieve the validation rule for a tabledef. Validation rules are used in connection with update operations. If a tabledef contains a validation rule, updates to that tabledef must match predetermined criteria before the data is changed. If the change does not match the criteria, an exception containing the value of GetValidationText is thrown. For a CDaoTableDef object, this CString is read-only for an attached table and read/write for a base table.
For more information on tabledefs, see the articles DAO Tabledef and DAO Tabledef: Using Tabledefs in Visual C++ Programmer's Guide. For related information, see the topic "ValidationRule Property" in DAO Help.
CDaoTableDef Overview | Class Members | Hierarchy Chart
See Also CDaoTableDef::SetValidationRule, CDaoTableDef::GetValidationText, CDaoTableDef::SetValidationText