#include <Ccdb_Environment.h>


Public Member Functions | |
| Environment () | |
| Environment (dtLARGE argc, dtSTRING *argv[]) | |
| ~Environment () | |
| Connection * | CreateConnection () |
| const dtSTRING * | GetDataSourceIniFile () |
| const dtSTRING * | GetProgramName () |
| const dtBOOLEAN | IsExceptionsEnabled () |
| void | SetExceptionsEnabled (const dtBOOLEAN) |
| dtRtnStatus | SetDataSourceIniFile (const dtSTRING *) |
| void | SetProgramName (const dtSTRING *) |
Public Member Functions inherited from dbSpaces::dbcli::cdbBase | |
| cdbBase (cdbBase *, ccdbClassType, dtBOOLEAN=TRUE) | |
| virtual | ~cdbBase () |
| cdb_childList_t & | GetChildList () |
| Ccoms_CommsManager * | GetTransportComms () |
| ccdbClassType | GetType () |
| void | SetTransportComms (Ccoms_CommsManager *) |
The Environment object holds environment information for the database client. The Environment object is the main object in the client database API and is used to create a Connection object that allows you to connect to the database server.
A DatabaseException will be thrown if a database error occurs and exceptions are enabled. If exceptions are not enabled the following error methods can be used to get information about the error;
| dbSpaces::dbcli::Environment::Environment | ( | ) |
Environment default constructor.
| dbSpaces::dbcli::Environment::Environment | ( | dtLARGE | argc, |
| dtSTRING * | argv[] | ||
| ) |
Environment constructor passing in run-time arguments.
| argc | The number of arguments. |
| argv | The array of arguments. |
| dbSpaces::dbcli::Environment::~Environment | ( | ) |
Environment default destructor.
| Connection * dbSpaces::dbcli::Environment::CreateConnection | ( | ) |
| const dtSTRING * dbSpaces::dbcli::Environment::GetDataSourceIniFile | ( | ) |
Get the data source ini file name.
| const dtSTRING * dbSpaces::dbcli::Environment::GetProgramName | ( | ) |
Get the program name.
| const dtBOOLEAN dbSpaces::dbcli::Environment::IsExceptionsEnabled | ( | ) |
Are error exceptions enabled?
TRUE if exceptions are enabled; FALSE if otherwise. | dtRtnStatus dbSpaces::dbcli::Environment::SetDataSourceIniFile | ( | const dtSTRING * | ) |
Set the data source ini file for the environment. The ini file should exist in the dbSpaces system directory.
| iniFileName | The name of the ini file to use. |
| DatabaseException | (if exceptions are enabled) when a database error occurs. |
| void dbSpaces::dbcli::Environment::SetExceptionsEnabled | ( | const | dtBOOLEAN | ) |
Set whether the system throws exceptions when there is an error. If exceptions are not thrown you will need to check the error state.
| state | TRUE if exceptions are to be thrown, otherwise FALSE. |
| void dbSpaces::dbcli::Environment::SetProgramName | ( | const dtSTRING * | ) |
Set the program name to identify the connection by in the server.
| name | The Program name. |