CODB Class are destined to control of the list accessibile dictionary.
In yours system (computer, local network, VPN, internet) may be many CODB data sourses (in configuration by default 32,000,000 ). CODB it is those class what provide DB supporting with methods description for access to certain CODB.
The information keeping into $CLIPROOT/etc/codb.dbf
APPEND | Add to list new CODB specifier. |
CLOSE | Close DB. |
CONNECT | Open DB. |
EXISTID | Check CODB identifier into list accessible CODB. |
GETVALUE | Get dictionary by CODB identifier. |
LIST | Returns list CODB what registered in system. |
NEW | Initiation new CODBLIST object. |
UPDATE | Update CODB description. |
Append(<oCodbData>) --> TRUE || FALSE
Append() returns TRUE if new CODB specifier added. The <oCodbData> must be contain property <ID>. This property specified CODB identifier.
The <oCodbData> can be contain property <TYPE> - the type of dictionary. By default it is CODB_DICTTYPE_DEFAULT. If <TYPE> is "DBF", then <oCodbData> can be contain attribute <PATH> - full path to dbf file (by default it is /home/$USER/codb+<ID>)
The properties of <oCodbData> see in file <"codbcfg.ch">
ID - CODB identifier and this one dictionary identifier (5 byte) NAME - CODB name TYPE - driver type to access to data: DBF - DBF (by default) MS - MySQL PG - Postgress OR - Oracle IB - Interbase and Firebird ODBC - ODBC data source PATH - path to data (only for DBF) HOST - name and IP address SQL server PORT - TCP port of SQL server USER - SQL-server user DBNAME - DB name into SQL server
<::Error> contain error descriptions if araised.
Connect(<sCodbID>[, <sUser>[, <sPasswd>]]) --> <oDict>
Connect() openes DB with identifier <sCodbID>. Made connect with SQL-server (if source is SQL-server) or openes necessary files and returns object of DICTIONARY class <oDict>.
<::Error> contain error descriptions if araised.
ExistId(<sCodbId>) --> TRUE || FALSE
ExistId() returns TRUE if CODB with identifier <sCodbId> is exist into list of registered CODB. In other returns FALSE.
<::Error> contain error descriptions if araised.
GetValue(<sCodbID>) --> <oDict>
GetValue() returns object of DICTIONARY class - <oDict> with identifier <sCodbID>.
<::Error> contain error descriptions if araised.
List() --> <aList>
List() returns list of registered CODB - <aList>. Every element of <aList> is string what contain CODB identifier and CODB name via <:>
Update(<oCodbData>) --> TRUE || FALSE
Update() returns TRUE if CODB specifier updated. The <oCodbData> must be contain property <ID>. This property specified CODB identifier.
The <oCodbData> can be contain property <TYPE> - the type of dictionary. By default it is CODB_DICTTYPE_DEFAULT. If <TYPE> is "DBF", then <oCodbData> can be contain attribute <PATH> - full path to dbf file (by default it is /home/$USER/codb+<ID>)
<::Error> contain error descriptions if araised.