New Field

From Appmethod Topics
Jump to: navigation, search

Go Up to Database Dialog Boxes

Use this dialog box to create persistent fields in a dataset. You can add persistent fields or replace existing persistent fields.

Item Description

Name

Enter the component's field name.

Component

Displays a name you enter in the Name field, prefixed with the component name. The product discards anything you enter directly in the Component edit box.

Type

Select the field component's data type. You must supply a data type for any new field component you create. For example, to display floating point currency values in a field, select Currency from the drop-down list.

Size

Specify the maximum number of characters that can be displayed or entered in a string-based field or the size of Bytes and VarBytes fields. For all other data types, Size is meaningless.

Data

Replaces an existing field (for example to change its data type) and is based on columns in the table or a query underlying a dataset.

Calculated

Displays values calculated at run time by a dataset's OnCalcFields event handler.

Lookup

Retrieve values from a specified dataset at run time based on search criteria you specify (not supported for unidirectional datasets).

InternalCalc

Retrieves values calculated at run time by a client dataset and stored with its data (instead of being dynamically calculated in an OnCalcFields event handler). InternalCalc is only available if you are working with a client dataset. Values calculated for an InternalCalc field are stored and retrieved as part of the client datasets data.

Aggregate

Retrieves a value summarizing the data in a set of records from a client dataset.

Key Fields

Lists the fields in the current dataset for which you can match values. To match more than one field, enter field names directly instead of choosing from the drop-down list. Separate multiple field names with semicolons. If you are using more than one field, you must use persistent field components.

Dataset

Lists the datasets in which to look up field values. The lookup dataset must be different from the dataset for the field component itself, or a circular reference exception is raised at run time.

Lookup Keys

Used only to create lookup fields. If you choose Lookup as the field type, the Key Fields and Dataset edit boxes in the Lookup definition group box are enabled. The Lookup Keys and Result Field boxes are only enabled if you are connected to a second dataset.

Result Field

Lists the fields in the lookup dataset that can be returned as the value of the lookup field you are creating.