22 #ifndef __ODBCXX_DRIVERMANAGER_H
23 #define __ODBCXX_DRIVERMANAGER_H
27 #include <odbc++/setup.h>
28 #include <odbc++/types.h>
40 ODBCXX_STRING description_;
41 std::vector<ODBCXX_STRING> attributes_;
48 Driver(
const ODBCXX_STRING& description,
49 const std::vector<ODBCXX_STRING>& attributes)
50 :description_(description), attributes_(attributes) {}
74 ODBCXX_STRING description_;
78 DataSource(
const ODBCXX_STRING& name,
const ODBCXX_STRING& description)
79 :name_(name), description_(description) {}
103 static SQLHENV henv_;
104 static std::auto_ptr<ErrorHandler> eh_;
105 static int loginTimeout_;
106 static SQLUSMALLINT driverCompletion_;
108 static void _checkInit();
117 static Connection* getConnection(
const ODBCXX_STRING& dsn,
118 const ODBCXX_STRING& user,
119 const ODBCXX_STRING& password);
124 static Connection* getConnection(
const ODBCXX_STRING& connectString);
129 static int getLoginTimeout();
135 static void setLoginTimeout(
int seconds);
142 static void setDriverCompletion(SQLUSMALLINT drvcmpl);
143 static SQLUSMALLINT getDriverCompletion(
void);
156 static void shutdown();
164 #endif // __ODBCXX_DRIVERMANAGER_H
A Data Source.
Definition: drivermanager.h:71
CleanVector< Driver * > DriverList
A list of Drivers.
Definition: drivermanager.h:67
An ODBC Driver with it's information.
Definition: drivermanager.h:38
const std::string & getName() const
Return the name of the data source.
Definition: drivermanager.h:85
CleanVector< DataSource * > DataSourceList
A list of datasources.
Definition: drivermanager.h:96
const std::string & getDescription() const
Return a description of the driver.
Definition: drivermanager.h:56
The DriverManager.
Definition: drivermanager.h:101
A database connection.
Definition: connection.h:38
Driver(const std::string &description, const std::vector< std::string > &attributes)
Constructor.
Definition: drivermanager.h:48
const std::string & getDescription() const
Return the description (if any) of the datasource.
Definition: drivermanager.h:90
DataSource(const std::string &name, const std::string &description)
Constructor.
Definition: drivermanager.h:78
virtual ~Driver()
Destructor.
Definition: drivermanager.h:53
virtual ~DataSource()
Destructor.
Definition: drivermanager.h:82
const std::vector< std::string > & getAttributes() const
Return a list of keys that can appear in a connect string using this driver.
Definition: drivermanager.h:61