Click or drag to resize

DbServer.OrderIsUnique Method

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

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD OrderIsUnique(
	uOrder,
	oFSIndex
) AS USUAL CLIPPER
Request Example View Source

Parameters

uOrder (Optional)
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 value will raise a runtime error.
oFSIndex (Optional)
Type: Usual
A string or filespec object that specifies the name of an index file, including an optional drive and directory (no extension should be specified). Use this argument with cOrder 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