The DriverManager.
More...
#include <drivermanager.h>
|
static Connection * | getConnection (const std::string &dsn, const std::string &user, const std::string &password) |
| Opens a connection by it's DSN, a username and a password.
|
|
static Connection * | getConnection (const std::string &connectString) |
| Opens a connection using an ODBC connect string.
|
|
static int | getLoginTimeout () |
| Gets the current login timeout in seconds.
|
|
static void | setLoginTimeout (int seconds) |
| Sets the login timeout in seconds.
|
|
static void | setDriverCompletion (SQLUSMALLINT drvcmpl) |
| Sets the Driver completion for Connections.
|
|
static DataSourceList * | getDataSources () |
| Fetch a list of all available data sources.
|
|
static DriverList * | getDrivers () |
| Fetch a list of the available drivers.
|
|
static void | shutdown () |
| Should be called before an application is to exit and after all connections have been closed.
|
|
static Connection* odbc::DriverManager::getConnection |
( |
const std::string & |
connectString | ) |
|
|
static |
Opens a connection using an ODBC connect string.
- Parameters
-
connectString | Usually something like "DSN=db;uid=user;pwd=password" |
static int odbc::DriverManager::getLoginTimeout |
( |
| ) |
|
|
static |
Gets the current login timeout in seconds.
- Returns
- The current login timeout in seconds, or 0 if disabled.
static void odbc::DriverManager::setDriverCompletion |
( |
SQLUSMALLINT |
drvcmpl | ) |
|
|
static |
Sets the Driver completion for Connections.
- Parameters
-
drvcmpl | Driver Completion Value SQL_DRIVER_NOPROMPT, SQL_DRIVER_COMPLETE(Default), SQL_DRIVER_PROMPT, SQL_DRIVER_COMPLETE_REQUIRED See Options for SQLDriverConnect |
static void odbc::DriverManager::setLoginTimeout |
( |
int |
seconds | ) |
|
|
static |
Sets the login timeout in seconds.
- Parameters
-
seconds | The number of seconds to wait for a connection to open. Set to 0 to disable. |
The documentation for this class was generated from the following file: