ComponentOne DataObjects for .NET
Defining Fields
DataObjects for .NET Express Edition > C1ExpressTable: Working with Simple and Composite Tables > Defining Fields

For simple tables, DataObjects for .NET Express retrieves the fields collection from the database table. For a composite table, you must select fields from underlying database tables and add them to your composite table using the Fields Editor. You can customize the Fields collection deleting and rearranging the fields, adding calculated fields and setting various field properties.

A field has a Name that must be unique in the table. A field can be renamed by renaming the field node in the Fields list. The name is used to identify the field as the name of the column exposed to the users, and as the default display name (caption) of the column.

The DataType property determines the field .NET type, and NativeDbType – its native database or OLE DB type. NativeDbType is used only for updating values in the database, and can be set to Any (-1), in which case its value is effectively ignored. When in doubt, useAny (-1) as the default value forNativeDbType.

See Also