Click or drag to resize

VoDbInfo Function (DWord, Usual)

X#
Retrieve information about a work area.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax
 FUNCTION VoDbInfo(
	kInfoType AS DWORD,
	ptrRetVal AS USUAL
) AS LOGIC
Request Example View Source

Parameters

kInfoType
Type: DWord
Determines what type of information is retrieved.
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
VODBInfo() is similar to DBInfo().
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 DBInfo() for more information.
Examples
The following examples return work area information:
X#
 1FUNCTION ShowInfo() AS VOID
 2    LOCAL uResult AS USUAL
 3    uResult := NIL
 4    IF VODBInfo(DBI_GETHEADERSIZE, @uResult)
 5        ? "HEADER(): ", uResult
 6    ELSE
 7        DoError()
 8    ENDIF
 9    IF VODBInfo(DBI_LASTUPDATE, @uResult)
10        ? "LUpdate(): ", uResult
11    ELSE
12        DoError()
13    ENDIF
14    IF VODBInfo(DBI_GETRECSIZE, @uResult)
15        ? "RecSize(): ", uResult
16    ELSE
17        DoError()
18    ENDIF
19    IF VODBInfo(DBI_FULLPATH, @uResult)
20        ? "PATHNAME: ", uResult
21    ELSE
22        DoError()
23    ENDIF
24    RETURN
25STATIC FUNCTION DoError() AS USUAL
26    LOCAL uRetCode<br />
27AS USUAL
28    LOCAL oError  <br />
29AS USUAL
30    oError := ErrorBuild(@strucErrInfo)
31    oError:FuncSym := #VODBInfo
32    RETURN EVAL(ErrorBlock(), oError)
See Also