DbInfo Function |
Namespace: XSharp.RT
Constant | Description |
---|---|
DBI_ALIAS | Returns the alias name of the work area as a string. |
DBI_BLOB_HANDLE | Returns an IntPtr representing the file handle for a BLOB file. The constant is most often used in conjunction with FieldInfo(DBS_BLOB_LEN, ...) and 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 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_RECOVER | Recovers 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_BOF | Returns a logical value indicating the data server's beginning-of-file status (see DBServer:BOF). |
DBI_CANPUTREC | Returns a logical value indicating whether the data server supports putting records. |
DBI_CHILDCOUNT | Returns the number of relations set from this data server. |
DBI_DB_VERSION | Returns the version number of the host RDD (CAVORDDB.DLL or CAVORDD.DLL). |
DBI_DBFILTER | Returns the filter expression as a string (see DBServer:Filter). |
DBI_EOF | Returns a logical value indicating the data server's end-of-file status (see DBServer:EOF). |
DBI_FCOUNT | Returns the number of fields (see DBServer:FCount). |
DBI_FILEHANDLE | Returns an IntPtr representing the file handle for this database file. |
DBI_FILESTREAM | Returns a stream object representing the file stream for this database file. |
DBI_FOUND | Returns a logical value indicating the success or filure of the last seek operation for this data server (see DBServer:Found). |
DBI_FULLPATH | Returns the full path name of opened database file. |
DBI_GETDELIMITER | Returns the default delimiter. |
DBI_GETHEADERSIZE | Returns the header size of the file (see DBServer:Header). |
DBI_GETLOCKARRAY | Returns the array of locked records. |
DBI_GETRECSIZE | Returns the record size of the file (see DBServer:RecSize). |
DBI_GETSCOPE | Returns the locate condition as a code block. |
DBI_ISANSI | Returns the ANSI flag of the database file (TRUE for ANSI and FALSE for OEM). |
DBI_ISDBF | Returns a logical value indicating whether the RDD provides support for the .DBF file format. |
DBI_ISFLOCK | Returns the file lock status. |
DBI_LASTUPDATE | Returns the last date on which the file was updated (see DBServer:LUpdate). |
DBI_LOCKCOUNT | Returns the number of locked records. |
DBI_LOCKOFFSET | Returns the current locking offset as a numeric value. |
DBI_MEMOBLOCKSIZE | Returns the block size for the memo file associated with this database. |
DBI_MEMOEXT | Returns the default extension for the memo file associated with this database. |
DBI_MEMOHANDLE | Returns an intptr representing the DOS file handle for the memo file associated with this database file. |
DBI_MEMOSTREAM | Returns a stream object representing the file stream for the memo file associated with this database file. |
DBI_MEMOPATH | Returns the full path name of opened memo file. |
DBI_RDD_VERSION | Returns the version number of the RDD for this database. |
DBI_SETDELIMITER | Sets the default delimiter. |
DBI_SHARED | Returns the shared flag value. |
DBI_TABLEEXT | Returns the database file extension. |
DBI_VALIDBUFFER | Returns a logical value indicating whether the current buffer is valid. |
DBI_USER | Start of user defined values. |
1? DBInfo(DBI_GETHEADERSIZE) // Same as Header() 2? DBInfo(DBI_LASTUPDATE) // Same as LUpdate() 3? DBInfo(DBI_GETRECSIZE) // Same as RecSize() 4? DBInfo(DBI_FULLPATH) // Full path name
1FUNCTION RddTest() 2 LOCAL n, i AS INT 3 LOCAL rddList AS _RDDLIST 4 USE Demo NEW 5 rddList := DBInfo(DBI_RDD_LIST) 6 ? "Involved Rdds: ", rddList.uiRddCount 7 FOR i := 1 UPTO rddList.uiRddCount 8 ? rddList.atomRddName[I] 9 NEXT I 10 MemFree(rddList) 11 RETURN