Click or drag to resize

DbRecordInfo Function

X#
Retrieve field definition information about a record.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION DbRecordInfo(
	kInfoType,
	uRecId,
	uNewValue
) AS USUAL CLIPPER
Request Example View Source

Parameters

kInfoType (Optional)
Type: Usual
Determines what type of information is retrieved.
The constants are listed in the Remarks section below.
uRecId (Optional)
Type: Usual
uNewValue (Optional)
Type: Usual
This parameter is reserved for RDDs that allow you to change the information rather than just retrieve it. None of the supplied RDDs support this argument. Either omit the argument or specify it as NIL.

Return Value

Type: Usual
Remarks
DBRecordInfo() retrieves information about the state of a record (row).
The type of information retrieved is specified as kInfoType:
Tip Tip
The values in the table below exist both as DEFINEs and also as members of the DbRecordInfo enum.
You can see the numeric values of the defines in the documentation of this Enum.
ConstantReturned Value
DBRI_BUFFPTR Pointer to current record buffer
DBRI_DELETED Is record deleted?
DBRI_DELETEDIs record deleted?
DBRI_RECSIZE Record length.
DBRI_LOCKED Is record locked?
DBRI_RECNORecord position (like the RecNo access).
DBRI_USERStart of user defined DBRI_ values.
Tip Tip
DBRI_USER is a constant that returns the minimum value that third-party RDD developers can use for defining new properties. Values less than DBRI_USER are reserved for X# development.
Examples
The following examples retrieve record information:
X#
 1DBRecordInfo(DBRI_RECSIZE)
 2// Same as RecSize()
 3DBRecordInfo(DBRI_LOCKED, 200)
 4// Is record 200 locked?
 5DBRecordInfo(DBRI_DELETED, 201)
 6// Is record 201 deleted?
 7DBRecordInfo(DBRI_FORCEREFRESH)
 8// Reread the current record into the buffer
 9DBRecordInfo(DBRI_RECNO, 230)
10// On which position is record 230?
11// If no orders are active, the position is 230,
12// otherwise the relative position within the
13// order will be returned.
14DBRecordInfo(DBRI_BUFFPTR)
15// Return pointer to current record in the buffer
See Also