XBaseFieldsCollection.Add
Syntax:
Parameters:
<Name> (required)
Name of the field being added. Supported only for Latin field names containing up to 10 characters.
<Type> (required)
Type of field being created: "N" - number, "S" - string, "D" - date, "L" - Boolean, "F" - analogous "N" - number, "M" - memo field (not supported).
<Length> (optional)
Total length of the field being created.
Required for fields of 'N', 'F' and 'S' types. Not required for fields of 'D' and 'L' types (default value is 0).
<Precision> (optional)
Length of a fractional part (only for numerical fields).
Default value: 0.
Description:
Availability:
Example:
xB.Fields.Add("CODE", "S", 5); xB.Fields.Add("NAME", "S", 40); xB.Fields.Add("COST", "N", 14, 2); xB.CreateFile("c:\test.dbf"); |
See also:
XBaseIndexesCollection, method Add