|
Sets or returns a variant array containing information on the fields of the current table as specified by DdfPath and TableName.
The FieldList property accepts and returns a variant encapsulating a two-dimensional variant array. The first subscript references one property of the field, and the second references the field ordinal. The properties referenced by the first subscript are:
When setting field information, the variant array must contain a minimum amount of information for each field to be defined. Required information includes a field name which is unique within the definition of the table, a valid datatype, and a valid size for data types which support more than one field length.
Note that the comment column of this array will be populated only if the DDFGetFieldComments method is called prior to reading the FieldList property.
If RefreshLocations is set to True, reading FieldList will cause the VAccess to re-read the DDF files and get the field information stored in the DDF. Changing FieldList with RefreshLocations set to True will no longer cause all changes to be immediately written to the DDF Files themselves. You must now call DdfAddTable, DdfModifyLocation, etc. to actually write the changes to the DDFs. This is a change in behavior since the release of the Pervasive PSQL SDK. If RefreshLocations is False, FieldList operations will read and update the VAccess control's memory image of the fields.
If DdfTransactionMode and RefreshLocations are both set to True, all manipulations of FieldList will occur within a transaction.
'getting fields Dim fields as Variant VAEngine.RefreshLocations = True VAEngine.DdfGetFieldComments = True VAEngine.TableName = tableName fields = VAEngine.FieldList VAEngine.RefreshLocations = False If Not IsEmpty(fields) For i = 0 to Ubound(fields, 2) 'put field names in a list box List.AddItem fields(1, i) Next i End If 'setting VAEngine.RefreshLocations = False VAEngine.FieldList = fields 'write changes to DDF - do not need to reset RefreshLocations VAEngine.DdfAddTable(True)
Affected by: DdfTransaction Mode, RefreshLocations
|
Chapter contents
Prev topic: ExtendedOps
|