Click or drag to resize

DbServer.OrderIsUnique Method

Return the status of the unique flag for a given order.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.5
Syntax
 VIRTUAL METHOD OrderIsUnique(
	uOrder AS USUAL,
	oFSIndex AS USUAL
) AS USUAL

Parameters

uOrder
Type: Usual
The name of the order or a number representing its position in the order list.  Using the order name is the preferred method since the position may be difficult to determine using multiple-order index files.  If omitted or NIL, the controlling order is assumed. Specifying an invalid order will raise a runtime error.
oFSIndex
Type: Usual
The name of an index file, including an optional drive and directory (no extension should be specified).  Use this argument with <uOrder> to remove ambiguity when there are two or more orders with the same name in different index files. If <oFSIndex> is not open by the current process, a runtime error is raised.

Return Value

Type: Usual
The status of the indicated order's unique flag as a logical value.
Examples
This example shows the return value of DBServer:OrderIsUnique() using various orders:
X#
 1oDBCust := Customer{}
 2oDBCust:CreateOrder("Last", "Customer",;
 3"oDBCust:LastName",, TRUE)
 4oDBCust:CreateOrder("First", "Customer",;
 5"oDBCust:FirstName")
 6oDBCust:CreateIndex("j:\test\tmp\age",    ;
 7"oDBCust:Age",, TRUE)
 8oDBCust:SetOrder("Last")
 9? oDBCust:OrderIsUnique()             // Result: TRUE, for order last
10? oDBCust:OrderIsUnique("First")    // Result: FALSE
11? oDBCust:OrderIsUnique("Age")        // Result: TRUE
See Also