Click or drag to resize

DbServer.Info Method

X#
Return and optionally change information about a data server.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Info(
	kInfoType,
	uInfo
) AS USUAL CLIPPER
Request Example View Source

Parameters

kInfoType (Optional)
Type: Usual
Specifies the type of information. The constants are described in the Constants section below.
The initial default of a setting depends on the RDD.
The constants are described in the Constants section below. Note, however, that not all constants are supported for all RDDs.
Important! _SET_USER is a constant that returns the minimum value that third-party RDD developers can use for defining new parameters. Values less than _SET_USER are reserved for X# development.
uInfo (Optional)
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
Tip Tip
The values in the table below exist both as DEFINEs and also as members of the DbInfo enum.
You can see the numeric values of the defines in the documentation of this Enum.
ConstantDescription
DBI_ALIASReturns the alias name of the work area as a string.
DBI_BLOB_HANDLE Returns an integer representing the DOS file handle for a BLOB file. T he 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_INTEGRITY Tests 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 IntPtr representing the file handle for this database file.
DBI_FILESTREAMReturns a stream object representing the file stream 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 intptr representing the DOS file handle for the memo file associated with this database file.
DBI_MEMOSTREAMReturns a stream object representing the file stream 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.
DBI_USERStart of user defined DBI_ values.
Tip Tip
DBI_USER is a constant that returns the minimum value that third-party RDD developers can use for defining new parameters. Values less than DBI_USER are reserved for X# development.
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