Click or drag to resize

VoDbOrderInfo Function (UInt32, String, Usual, Usual)

Return information about index files and the orders in them.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION VoDbOrderInfo(
	kInfoType AS DWORD,
	cIndexFile AS STRING,
	uOrder AS USUAL,
	uValue AS USUAL
) AS LOGIC
View Source

Parameters

kInfoType
Type: UInt32
Determines what type of information is retrieved.
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.
uValue
Type: Usual
New value to assign to the Order.

Return Value

Type: Boolean
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 global structure, StrucErrInfo, will contain needed information regarding any error that occurs.  See DBOrderInfo() 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 uRetCode<br />
24AS USUAL
25    LOCAL oError  <br />
26AS USUAL
27    oError := ErrorBuild(@strucErrInfo)
28    oError:FuncSym := #VODBOrderInfo
29    RETURN EVAL(ErrorBlock(), oError)
See Also