Adds a new calculated column to a specified table.
Syntax
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As TOLAPCube
Dim OriginalTable As DataTable
Dim ColumnName As String
Dim ColumnType As Type
Dim SourceColumnName As String
Dim value As TDataColumn
value = instance.AddCalculatedColumn(OriginalTable, ColumnName, ColumnType, SourceColumnName) |
Parameters
- OriginalTable
- Defines the table to put the new field into.
- ColumnName
- Defines the name of the new field.
- ColumnType
- Defines the type of the new column.
- SourceColumnName
- If it is defined, the method creates an auto-calculated field that
computes its value from another field and doesn’t require OnCalculateField event.
Otherwise it creates event-calculated field which requires OnCalculateField event handler to be cumputed.
Return Value
Returns either a matching column from the specified table or, if there's no match, creates and returns a new one.
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also