Switch to: V9V8V7V6V5

VTable Class: Alter Methods

VTable.ChangeType()

Declaration:

ChangeType( 
	inFld as VField, 
	inNewType as EVFieldType, 
	inParam1 as Integer ) as VField

Parameters:

  • inFld - The field whose type should be changed.
  • inNewType - New type for a field.
  • inParam - The Additional parameter (see below).

Description:

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.

Example:

fld = Table.ChangeType( fld, EVFieldType.kTypeString,40 )

VTable.DropField()

Declaration:

DropField( inFld as VField )

Parameters:

  • inFld - The field that should be deleted.

Description:

Removes the referenced field (column) from a Table. This operation is undoable! It will occur instantaneously for a Table with any number of records.

Example:

Table.DropField( fld )