Partilhar via


DictTable.Primaryindex Method

Definition

Overloads

Primaryindex()

Returns the ID of the primary index for the table.

Primaryindex(Boolean)

Primaryindex()

Returns the ID of the primary index for the table.

public:
 virtual int Primaryindex();
public virtual int Primaryindex ();
abstract member Primaryindex : unit -> int
override this.Primaryindex : unit -> int
Public Overridable Function Primaryindex () As Integer

Returns

The ID of the primary index for the table; 0 (zero) if there is no primary index for the table.

Remarks

The following example shows the retrieval of the primary index for a table.

DictTable dt; 
DictIndex di; 
int       i; 
dt = new DictTable(tablenum(CustTable)); 
if (dt) 
{ 
    i = dt.primaryIndex(); 
    if (0 != i) 
    { 
        di = new DictIndex(tablenum(CustTable), i); 
        print di.name(); 
    } 
}

Applies to

Primaryindex(Boolean)

public:
 virtual int Primaryindex(bool asDefinedInAOT);
public virtual int Primaryindex (bool asDefinedInAOT);
abstract member Primaryindex : bool -> int
override this.Primaryindex : bool -> int
Public Overridable Function Primaryindex (asDefinedInAOT As Boolean) As Integer

Parameters

asDefinedInAOT
Boolean

A Boolean value that indicates whether the primary index to retrieve is defined in the AOT. A value of true returns the primary index as defined in the AOT. A value of false returns the primary index as defined in the SQL table; optional.

Returns

Applies to