Adds a new object to the specified collection.
VBA / VB.NET
RetVal = object.Add(Name, DataType [, Precision] [, Scale])
VBA / VB.NET
RetVal = object.Add(FieldName, Value)
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, DisplayAttributes)
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, KeyDescriptions)
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, SQLText)
VBA / VB.NET
RetVal = object.Add(Name, DataType [, Precision] [, Scale])
Type: KeyDescriptions
The object or objects this method applies to.
Type: String; input-only
The name of the column to be added.
Type: CaoDataType enum; input-only
The data type of the column being added. Specify one of the following constants:
Type: Integer; input-only; optional
The meaning of Precision depends on the DataType specified, as follows:
Precision is ignored for all other data types.
Type: Integer; input-only; optional
Numeric scale for kCaoTypeNumeric. Ignored for all other data types.
Type: KeyDescription
The newly added object.
VBA / VB.NET
RetVal = object.Add(FieldName, Value)
Type: KeyValues
The object or objects this method applies to.
Type: String; input-only
The name of the field to be added.
Type: Variant; input-only
The value of the field being added.
Type: KeyValue
The newly added object.
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, DisplayAttributes)
Type: LabelTemplates
The object or objects this method applies to.
Type: String; input-only
Data source name.
Type: String; input-only
Catalog name.
Type: String; input-only
Schema name.
Type: String; input-only
Table name.
Type: String; input-only
Label template name.
Type: Variant (String or array of strings); input-only
Column names to be displayed as label or format strings. Where a single string is specified, CAO assumes the string is a format string. An array of strings is interpreted as a list of column names.
Format strings are compatible with MText format strings. Refer to database table columns in format strings using the following syntax:
#(<column name>)
For example:
#(name)
Column names are converted to the following format string:
#(<column name 1>\P#(<column name 2>)
Type: LabelTemplate
The newly added object.
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, KeyDescriptions)
Type: LabelTemplates
The object or objects this method applies to.
Type: String; input-only
Data source name.
Type: String; input-only
Catalog name.
Type: String; input-only
Schema name.
Type: String; input-only
Table name.
Type: String; input-only
Link template name.
Type: KeyDescriptions; input-only
Key descriptions for the link template.
Type: LinkTemplate
The newly added object.
VBA / VB.NET
RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, SQLText)
Type: Queries
The object or objects this method applies to.
Type: String; input-only
Data source name.
Type: String; input-only
Catalog name.
Type: String; input-only
Schema name.
Type: String; input-only
Table name.
Type: String; input-only
Link template name.
Type: String; input-only
The SQL statement.
Type: Query
The newly added object.