Provides access to members that control the Field Checker.
IFieldChecker has methods for validating fields collections and table names for a specific workspace. It's strongly recommended that this interface be used prior to two types of operations:
- Creating a new tabular dataset (such as a table or a feature class) from scratch
- Creating a new dataset based on an existing dataset, for example by using the feature data converter, or cloning an existing dataset's fields.
The main difference between these two cases is that while setting the ValidateWorkspace property is required to validate in either case, setting the InputWorkspace property is only required for the second case.
The Validate and ValidateField methods are responsible for verifying that field name, data types, and other parameters meet a minimum set of criteria that are required for the target workspace (set using the ValidateWorkspace property). ValidateTableName is used to verify that a table's name is not a reserved word, and that it does not start with or contain any invalid characters.
|InputWorkspace||Input workspace of the fieldchecker.|
|Validate||Checks the validity of a list of field names.|
|ValidateField||Checks the validity of a field.|
|ValidateTableName||Checks the validity of a table name.|
|ValidateWorkspace||Workspace of the fieldchecker.|
CoClasses that implement IFieldChecker
|CoClasses and Classes||Description|
|FieldChecker||Checks for errors in Field Name.|
The logic used to determine if the OID field should be renamed to "ObjectID" can be classified with 4 cases.
Case1: Both the InputWorkspace and ValidateWorkspace are provided.
- The OID field is renamed to "ObjectID" if the InputWorkspace is of type esriFileSystemWorkspace and the ValidateWorkspace is a Geodatabase workspace (type esriLocalDatabaseWorkspace or esriRemoteDatabaseWorkspace).
Case2: Only the InputWorkspace is provided (the ValidateWorkspace has not been provided).
- The OID field is renamed to "ObjectID" if the InputWorkspace is of type esriFileSystemWorkspace.
Case3: Only the ValidateWorkspace is provided (the InputWorkspace has not been provided).
- The OID field is renamed to "ObjectID" if the ValidateWorkspace is a Geodatabase workspace.
Case4: Neither of the workspaces is provided
- The OID field is not renamed to "ObjectID"