class Utility

Library: Data/ODBC
Package: ODBC
Header: Poco/Data/ODBC/Utility.h


Various utility functions

Member Summary

Member Functions: cDataType, dataSources, drivers, isError, mapInsert, sqlDataType



typedef std::map < std::string, std::string > DSNMap;


typedef DSNMap DriverMap;

Member Functions

cDataType static inline

static int cDataType(
    int sqlDataType

Returns C data type corresponding to supplied SQL data type.

dataSources static

static DSNMap & dataSources(
    DSNMap & dsnMap

Returns DSN-description map of available ODBC data sources.

drivers static

static DriverMap & drivers(
    DriverMap & driverMap

Returns driver-attributes map of available ODBC drivers.

isError static inline

static bool isError(

Returns true if return code is error

mapInsert static inline

template < typename MapType, typename KeyArgType, typename ValueArgType > static typename MapType::iterator mapInsert(
    MapType & m,
    const KeyArgType & k,
    const ValueArgType & v

Utility map "insert or replace" function (from S. Meyers: Effective STL, Item 24)

sqlDataType static inline

static int sqlDataType(
    int cDataType

Returns SQL data type corresponding to supplied C data type.


boolDataType static

static const SQLSMALLINT boolDataType;

ODBC size for bool data type.