Bagikan melalui


CDaoTableDef::GetValidationRule

Call this member function to retrieve the validation rule for a tabledef.

CString GetValidationRule( );

Return Value

A CString object that validates the data in a field as it is changed or added to a table.

Remarks

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 related information, see the topic "ValidationRule Property" in DAO Help.

Requirements

Header: afxdao.h

See Also

Reference

CDaoTableDef Class

Hierarchy Chart

CDaoTableDef::SetValidationRule

CDaoTableDef::GetValidationText

CDaoTableDef::SetValidationText

Other Resources

CDaoTableDef Members