SQL::IndexColumnInfo Object

A SQL index contains one or more columns. as a result, a SQL::IndexInfo object contains one or more SQL::IndexColumnInfo objects, each of which describes one of the column(s) that make up the primary key, the foreign key, of a unique or non-unique index.

dim conn as SQL::Connection

dim ti as SQL::TableInfo

dim ii as SQL::IndexInfo

dim ic1 as SQL::IndexColumnInfo

connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"

if .not. conn.open(connString) then

    ui_msg_box("Error", conn.CallResult.text)

    end

end if

ic1.name = "lastname"

ii.AddColumn(ic1)

ii.unique = .f.

ti.name = "customer"

ui_msg_box("Index Column Definition", ic1.XML)

Properties

The SQL::IndexColumnInfo object has the following properties.

Property

Type

Mode

Description

Ascending

L

R

Default = FALSE (.F.)

  • True (.T.) = column is in ascending order.

  • False (.F.) = the column is in descending order.

Name

C

R

Default = "". The unique name of the column to be indexed within the table.

NullAllowed

L

R

Default = FALSE (.F.)

  • True (.T.) = the column can be included in the index even if it is NULL.

  • False (.F.) = the column may not be included in the index if it is NULL.

ReferenceName

C

RW

Default = "".

XML

C

RW

The schema in XML format.

Methods

The SQL::IndexColumnInfo object has the following methods.

Method

Description

::Clone()

Makes a copy of the SQL::IndexColumnInfo object and its contents.

See Also

SQL Objects

Supported By

Alpha Five Version 8 Enterprise Edition

Limitations

Desktop applications only.