VTable Class: Alter Methods
ChangeType( inFld as VField, inNewType as EVFieldType, inParam1 as Integer ) as VField
- inFld - The field whose type should be changed.
- inNewType - New type for a field.
- inParam - The Additional parameter (see below).
Sometimes you may need to change the type of a field. For example, if you first made a field “Quantity” as VUShort and later you have found that in real life the quantity might be more than 65’535, you will need to change its type into VULong.
For String and VarChar fields inParam is MaxLength. For BLOB an its subtypes (Text, Picture) in Param is SegmentSize. For all remaining types of fields, in Param is ignored and should be zero.
fld = Table.ChangeType( fld, EVFieldType.kTypeString,40 )
DropField( inFld as VField )
- inFld - The field that should be deleted.
Removes the referenced field (column) from a Table. This operation is undoable! It will occur instantaneously for a Table with any number of records.
Table.DropField( fld )