Click or drag to resize

VoDbRecordInfo Function (UInt32, Usual, Usual)

Retrieve information about a record.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION VoDbRecordInfo(
	kInfoType AS DWORD,
	nRecID AS USUAL,
	ptrRetVal REF USUAL
) AS LOGIC
View Source

Parameters

kInfoType
Type: UInt32
Determines what type of information is retrieved..
nRecID
Type: Usual
The ID of the record to retrieve information on.  A value of 0L means the current record.
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: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
VODBRecordInfo() is similar to DBRecordInfo().  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 DBRecordInfo() for more information.
Examples
The following examples retrieve record information:
X#
FUNCTION ShowRecordInfo() AS VOID
        LOCAL uResult AS USUAL
        uResult := NIL
        IF VODBRecordInfo(DBRI_LEN,0,@uResult)
                ? "RecSize(): ", uResult
        ELSE
                DoError()
        ENDIF
        IF VODBRecordInfo(DBRI_LOCKED,200,@uResult)
                ? "Locking flag of record 200: ", uResult
        ELSE
                DoError()
        ENDIF
        RETURN
STATIC FUNCTION DoError() AS USUAL
        LOCAL uRetCode  AS USUAL
        LOCAL oError    AS USUAL
        oError := ErrorBuild(@strucErrInfo)
        oError:FuncSym := #VODBRecordInfo
        RETURN EVAL(ErrorBlock(), oError)
See Also