Click or drag to resize

OrderSpec.OrderAdd Method (Typed)

X#
Adds order information from an existing index file to the OrderSpec object and associates this OrderSpec object with the DBFileSpec object used for instantiation.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD OrderAdd(
	oFS,
	uOrder
) AS LOGIC CLIPPER
Request Example View Source

Parameters

oFS (Optional)
Type: Usual
A string or filespec object that specifies the full path to the index file or a FileSpec object of the index file.
uOrder (Optional)
Type: Usual
The order name or numeric position if using multi-order files.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Examples
The following examples illustrate several different types of orders you can add:
X#
 1// add orders from a multi-order file:
 2oDB := DBFileSpec{, "DBFCDX"}
 3IF oDB:Find()
 4oOrd1 := OrderSpec{oDB}
 5oOrd2 := OrderSpec{oDB}
 6oOrd3 := OrderSpec{oDB}
 7oOrd1:OrderAdd("C:\TEST\customer.cdx", "FirstName")
 8oOrd2:OrderAdd("C:\TEST\customer.cdx", "LastName")
 9oOrd3:OrderAdd("C:\TEST\customer.cdx", "CustNum")
10ENDIF
11// add orders from single-order files:
12oDB := DBFileSpec{, "DBFNTX"}
13IF oDB:Find()
14oOrd1 := OrderSpec{oDB}
15oOrd2 := OrderSpec{oDB}
16oOrd3 := OrderSpec{oDB}
17oOrd1:OrderAdd("C:\TEST\cust1.ntx")
18oOrd2:OrderAdd("C:\TEST\cust2.ntx")
19oOrd3:OrderAdd("C:\TEST\cust3.ntx")
20ENDIF
See Also