SQL::IndexInfo::InsertColumn()
Syntax
Result_Flag as L = <SQL::IndexInfo>.InsertColumn( <IndexColumn> as SQL::IndexColumnInfo [, InsertBefore as N ] )
|
Argument |
Description |
| Result_Flag | Indicates whether the operation was successful. |
|
<IndexColumn> |
A SQL::IndexColumnInfo object and having (at a minimum) a value for the .name property. |
| InsertBefore | Optional. The index of the column before which the new column should be inserted. |
Description
The SQL::IndexInfo.InsertColumn() method adds a new column definition to a <SQL::IndexInfo> index definition.
Example
|
dim IndexInfo as SQL::IndexInfo dim IndexColumn as SQL::IndexColumnInfo IndexInfo.Name = "Primary_Key" IndexInfo.PrimaryKey = .t. IndexColumn.Name = "MyColumnName" if .not. IndexInfo.AddColumn(IndexColumn) then ui_msg_box("Error", "Could not add index") end if IndexInfo.Name = "Lastname" IndexInfo.PrimaryKey = .f. IndexColumn.Name = "Lastname" if .not. IndexInfo.InsertColumn(IndexColumn, 1) then ui_msg_box("Error", "Could not insert index") end if ui_msg_box("Index Column Definition", IndexInfo.XML) |
See Also
Supported By
Alpha Five Version 8 Enterprise Edition
Limitations
Desktop applications only.