libodbc++  0.2.5
Static Public Member Functions | List of all members
odbc::DriverManager Class Reference

The DriverManager. More...

#include <drivermanager.h>

Static Public Member Functions

static ConnectiongetConnection (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 ConnectiongetConnection (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 DataSourceListgetDataSources ()
 Fetch a list of all available data sources.
 
static DriverListgetDrivers ()
 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.
 

Detailed Description

The DriverManager.

Member Function Documentation

static Connection* odbc::DriverManager::getConnection ( const std::string &  connectString)
static

Opens a connection using an ODBC connect string.

Parameters
connectStringUsually 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
drvcmplDriver 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
secondsThe 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:

Go back to the libodbc++ homepage