Constructor for TFieldDef.
Source position: db.pas line 197
public constructor TFieldDef.Create( |
ACollection: TCollection |
); override; |
AOwner: TFieldDefs; |
const AName: string; |
ADataType: TFieldType; |
ASize: Integer; |
ARequired: Boolean; |
AFieldNo: LongInt; |
ACodePage: TSystemCodePage = CP_ACP |
); overload; |
ACollection |
|
TFieldDefs instance to which to append the definition, or Nil. |
AOwner |
|
Owner of the fielddef. |
AName |
|
Name of the field. |
ADataType |
|
Data type of the field. |
ASize |
|
Storage size for the field contents, or zero for fixed-size fields. |
ARequired |
|
Is the fields required or not. |
AFieldNo |
|
Number of the field. |
ACodePage |
|
Codepage for the string field. |
Create is the constructor for the TFieldDef class.
If a simple call is used, with a single argument ACollection, the inherited Create is called and the Field number is set to the incremented current index.
If the more complicated call is used, with multiple arguments, then after the inherited Create call, the Name, datatype, size, precision, FieldNo, Required and CodePage property are all set according to the passed arguments.
If a duplicate name is passed, then an exception will occur.
Name |
||
|
Data type for the field. |
|
|
Size of the buffer needed to store the data of the field. |
|
|
Precision used in BCD (Binary Coded Decimal) fields. |
|
|
Field number. |
|
|
Is the field required ? |
|
|
System code page for the values in string and wide string field types. |