Click or drag to resize

VoDbOrderInfo Function (DWord, String, Usual, Usual)

X#
Return information about index files and the orders in them.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION VoDbOrderInfo(
	kInfoType AS DWORD,
	cIndexFile AS STRING,
	uOrder AS USUAL,
	ptrRetVal REF USUAL
) AS LOGIC
Request Example View Source

Parameters

kInfoType
Type: DWord
Determines what type of information is retrieved. See the table in the Remarks section below.
cIndexFile
Type: String
The name of an open index file (only the eight-letter file name is needed).
Use this argument with cOrder to remove ambiguity when there are two or more orders with the same name in different index files.
To omit the argument, specify NULL_STRING.
uOrder
Type: Usual
The name of the order about which you want to obtain information or a number representing its position in the order list.
To omit the cOrder | nPosition argument, specify NIL.
ptrRetVal
Type: Usual
A pointer to a polymorphic value.
This value will receive the requested information if the function is successful and will be unchanged otherwise.
If you just want to retrieve information, this value must be NIL before calling the function.
Using a non-NIL value is not currently supported by any of the supplied RDDs .
This feature is reserved for RDDs that allow you to change the information rather than just retrieve it.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
VODBOrderInfo() is similar to DBOrderInfo().
This function, however, does not call the error handler and will not, therefore, produce a runtime error message or create an error object if it fails. Thus, it may be important to check the return value to determine if the function succeeded.
the LastRddError property in the runtime state. will contain needed information regarding any error that occurs.
See DbOrderInfo(Usual, Usual, Usual, Usual) for more information.
Examples
The following examples return order access information:
X#
 1FUNCTION ShowOrderInfo() AS VOID
 2    LOCAL uResult AS USUAL
 3    uResult := NIL
 4    IF VODBOrderInfo(DBOI_EXPRESSION,"",0,@uResult)
 5        ? "IndexKey(): ", uResult
 6    ELSE
 7        DoError()
 8    ENDIF
 9    // Record number for specified position:
10    uResult := 100
11    IF VODBOrderInfo(DBOI_RECNO,"",0,@uResult)
12        ? "Record number of position 100: ", uResult
13    ELSE
14        DoError()
15    ENDIF
16    IF VODBOrderInfo(DBOI_FULLPATH,"",0,@uResult)
17        ? "FULLPATH of index file: ", uResult
18    ELSE
19        DoError()
20    ENDIF
21    RETURN
22STATIC FUNCTION DoError() AS USUAL
23    LOCAL uRetCodeAS USUAL
24    LOCAL oError  AS USUAL
25    oError := ErrorBuild(RuntimeState.LastRddError)
26    oError:FuncSym := #VODBOrderInfo
27    RETURN EVAL(ErrorBlock(), oError)
See Also