VoDbRecordInfo Function (DWord, Usual, Usual) | |
Retrieve information about a record.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION VoDbRecordInfo(
kInfoType AS DWORD,
nRecID AS USUAL,
ptrRetVal REF USUAL
) AS LOGIC
public static bool VoDbRecordInfo(
uint kInfoType,
Usual nRecID,
ref Usual ptrRetVal
)
Request Example
View SourceParameters
- kInfoType
- Type: DWord
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:
Logic
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:
1FUNCTION ShowRecordInfo() AS VOID
2 LOCAL uResult AS USUAL
3 uResult := NIL
4 IF VODBRecordInfo(DBRI_LEN,0,@uResult)
5 ? "RecSize(): ", uResult
6 ELSE
7 DoError()
8 ENDIF
9 IF VODBRecordInfo(DBRI_LOCKED,200,@uResult)
10 ? "Locking flag of record 200: ", uResult
11 ELSE
12 DoError()
13 ENDIF
14 RETURN
15STATIC FUNCTION DoError() AS USUAL
16 LOCAL uRetCode<br />
17AS USUAL
18 LOCAL oError <br />
19AS USUAL
20 oError := ErrorBuild(@strucErrInfo)
21 oError:FuncSym := #VODBRecordInfo
22 RETURN EVAL(ErrorBlock(), oError)
See Also