VoDbRecordInfo Function (DWord, Usual, Usual) | |
Retrieve information about a record.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
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 LastRddError property in the runtime state. will contain needed information regarding any error that occurs.
See
DbRecordInfo(Usual, Usual, Usual) for more information.
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.
|
Constant | Returned Value |
---|
DBRI_BUFFPTR
| Pointer to current record buffer |
DBRI_DELETED
| Is record deleted? |
DBRI_DELETED | Is record deleted? |
DBRI_RECSIZE
|
Record length.
|
DBRI_LOCKED |
Is record locked?
|
DBRI_RECNO | Record position (like the RecNo access). |
DBRI_USER | Start of user defined DBRI_ values. |
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:
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 AS USUAL
17 LOCAL oError AS USUAL
18 oError := ErrorBuild(RuntimeState.LastRddError)
19 oError:FuncSym := #VODBRecordInfo
20 RETURN EVAL(ErrorBlock(), oError)
See Also