Function OrdInfo() Foundation

Sets or returns information about an order/index

Syntax
OrdInfo( <nDefine>, [<xNewSetting>] ) --> xOldSetting
Parameters
<nDefine>
For the parameter <nDefine>, a #define constant must be used from an #include file. This determines the setting selected for the current order. Depending on the database engine used, specific constants can be set. For CDX files, the specific constants have the prefix CDXORD_ and can be found in the CDXDBE.CH include file.
<xNewSetting>
For settings of an order that can be changed, the setting specified by <nDefine> is replaced by the value <xNewSetting>.
Return

The return value of OrdInfo() is the value for the setting specified by <nDefine> in the order. If it is a changeable setting and <xNewSetting> was specified, the function returns the old value.

Description

The function OrdInfo() allows the current value of settings to be read or new values assigned and is only valid for the current order. To set or get information about other orders the function OrdSetFocus() must be used to change the current order.

Examples
OrdInfo()
// In the example one table and index file are used. 
// then the key-type of the current order is determined 
// using OrdInfo() 
// 
#include "cdxdbe.ch" 
PROCEDURE Main 

USE PARTS INDEX PARTS VIA FOXCDX 

? OrdInfo(CDXORD_KEYTYPE)  // result: C 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.