QryKeyFlds contains the name of one or more key fields used to arrange the query records.
dbfile.QryKeyFlds Type(*String)
When you use QryKeyFlds, the file sequence is changed to your new specification. This means that keyed operations for SETLL, SETGT, CHAIN, READRAND, READE, READPE, READRANGE and SETRANGE can result in undesirable or unpredictable results. To ensure that inadvertent use of keyed operations is not allowed, set the dclDiskFile’s Random keyword value to *NO.
QryKeyFlds must be set prior to opening the file (see OPEN command).
If QryKeyFlds is not set, the value of the QryKeyFlds parameter specified in the DCLDISKFILE command is used.
Each key field is composed of a field name followed by optional attributes that determine the sorting order (ascending descending, or absolute value for numeric fields).
KeyFieldName must be a valid field name in the file. Attributes consist of the following: *ASCEND, *DESCEND, or *ABSVAL. You can have as many attributes as you want after a field name as long as they conform to the rules below.
If there are any errors in the key fields' expression, they will not be detected until the file is opened at run-time.
Use QrySelect in conjunction with QryKeyFlds to specify the selection criteria indicating which records to select from a file. Use QryFileName to specify the name of the temporary query file created. Selection expressions are evaluated during file open time. Therefore, a runtime error will be generated during the opening of the file when a selection expression error is encountered.
Example
myFile.QryKeyFlds = "CMActive *DESCEND CMState *ASCEND CMCity *ASCEND CMFax *ABSVAL *DESCEND"
Namespace: ASNA.VisualRPG.Runtime
Assembly: ASNA Visual RPG Runtime (in ASNA.VisualRPG.Runtime.dll)
Platforms: Windows 2000 Professional SP4, Windows 2000 Server SP4, Windows Server 2003, Windows XP Professional SP2, Windows Vista Business Edition
ASNA.VisualRPG.Runtime
DBFile Class
DBFile Members
DCLDISKFILE
QryFileName Field
QrySelect Field