Click or drag to resize

DbServer.Info Method

Return and optionally change information about a data server.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.5
Syntax
 VIRTUAL METHOD Info(
	kInfoType AS USUAL,
	uInfo AS USUAL
) AS USUAL

Parameters

kInfoType
Type: Usual
Specifies the type of information.  The constants are described in the Constants section below.  Note, however, that not all constants are supported for all RDDs.
Important!  DBI_USER is a constant that returns the minimum value that third-party RDD developers can use for defining new <kInfoType> parameters.  Values less than DBI_USER are reserved for CA development.
uInfo
Type: Usual
If specified, this parameter is used to change the value of a setting.  The data type (and whether <uInfo> can be specified), depends on the <kInfoType> constant and is documented in the Constants section below.

Return Value

Type: Usual
If <uInfo> is not specified, DBServer:RDDInfo() returns the current setting.  If <uInfo> is specified, the previous setting is returned.
Remarks
ConstantDescription
DBI_ALIASReturns the alias name of the work area as a string.
DBI_BLOB_HANDLEReturns an integer representing the DOS file handle for a BLOB file.  The constant is most often used in conjunction with DBServer:FieldInfo(DBS_BLOB_LEN, ...) and DBServer:FieldInfo(DBS_BLOB_POINTER, ...) to directly access BLOB fields using low-level functions, such as FRead().
DBI_BLOB_INTEGRITYTests a BLOB file for the integrity of its internal tables and returns a logical value indicating the success (TRUE) or failure (FALSE) of the integrity check.  This should not generally be necessary, but it is handy if the file's integrity is in question for any reason.  This does not test the integrity between the .DBF and the BLOB file.
If the integrity check fails, you can run DBServer:Info(DBI_BLOB_RECOVER), which will automatically correct the BLOB file's tables, however, it will abandon some space within the file that would otherwise be reused.

Important!  DBServer:Info(DBI_BLOB_INTEGRITY) is a disk intensive operation and may slow down processing of the data server significantly, especially on a busy network.
DBI_BLOB_RECOVERRecovers a damaged BLOB file by correcting its internal tables and returns NIL.  You should run this only if DBServer:Info(DBI_BLOB_INTEGRITY) returns FALSE.  Note that after running DBServer:Info(DBI_BLOB_RECOVER), the BLOB file loses some size efficiency.
DBI_BOFReturns a logical value indicating the data server's beginning-of-file status (see DBServer:BOF).
DBI_CANPUTRECReturns a logical value indicating whether the data server supports putting records.
DBI_CHILDCOUNTReturns the number of relations set from this data server.
DBI_DB_VERSIONReturns the version number of the host RDD (CAVORDDB.DLL or CAVORDD.DLL).
DBI_DBFILTERReturns the filter expression as a string (see DBServer:Filter).
DBI_EOFReturns a logical value indicating the data server's end-of-file status (see DBServer:EOF).
DBI_FCOUNTReturns the number of fields (see DBServer:FCount).
DBI_FILEHANDLEReturns an integer representing the DOS file handle for this database file.
DBI_FOUNDReturns a logical value indicating the success or filure of the last seek operation for this data server (see DBServer:Found).
DBI_FULLPATHReturns the full path name of opened database file.
DBI_GETDELIMITERReturns the default delimiter.
DBI_GETHEADERSIZEReturns the header size of the file (see DBServer:Header).
DBI_GETLOCKARRAYReturns the array of locked records.
DBI_GETRECSIZEReturns the record size of the file (see DBServer:RecSize).
DBI_GETSCOPEReturns the locate condition as a code block.
DBI_ISANSIReturns the ANSI flag of the database file (TRUE for ANSI and FALSE for OEM).
DBI_ISDBFReturns a logical value indicating whether the RDD provides support for the .DBF file format.
DBI_ISFLOCKReturns the file lock status.
DBI_LASTUPDATEReturns the last date on which the file was updated (see DBServer:LUpdate).
DBI_LOCKCOUNTReturns the number of locked records.
DBI_LOCKOFFSETReturns the current locking offset as a numeric value.
DBI_MEMOBLOCKSIZEReturns the block size for the memo file associated with this database.
DBI_MEMOEXTReturns the default extension for the memo file associated with this database.
DBI_MEMOHANDLEReturns an integer representing the DOS file handle for the memo file associated with this database file.
DBI_RDD_VERSIONReturns the version number of the RDD for this database.
DBI_SETDELIMITERSets the default delimiter.
DBI_SHAREDReturns the shared flag value.
DBI_TABLEEXTReturns the database file extension.
DBI_VALIDBUFFERReturns a logical value indicating whether the current buffer is valid.
Examples
The following examples return data server information:
X#
1// Same as oDBServer:Header
2oDBServer:Info(DBI_GETHEADERSIZE)
3// Same as oDBServer:LUpdate
4oDBServer:Info(DBI_LASTUPDATE)
5// Same as oDBServer:RecSize
6oDBServer:Info(DBI_GETRECSIZE)
7// Get the full path
8oDBServer:Info(DBI_FULLPATH)
See Also