Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cODBCEnv Class Reference

#include <cODBCEnv.h>

Inheritance diagram for GrayLib::cODBCEnv:
GrayLib::cODBCBase Gray::cSingleton< cODBCEnv > ISQLDriver Gray::cRefBase Gray::cSingletonStatic< TYPE > Gray::cSingletonRegister IUnknown Gray::CObject Gray::cHeapObject Gray::IHeapObject

Public Member Functions

 cODBCEnv ()
 
virtual bool SetSQLAttr (long nAttribute, void *pValue) override
 
virtual ISQLDatabaseAllocISQLDatabase (const cSQLConnectionString &rConnectionString) override
 
cArrayString< FILECHAR_tGetInstalledDrivers ()
 
 IUNKNOWN_DISAMBIG (SUPER_t)
 
virtual HRESULT FillException (cSQLException *pException=nullptr) override
 
- Public Member Functions inherited from GrayLib::cODBCBase
 cODBCBase (SQLSMALLINT nSQLHandleType, cODBCBase *pParent)
 
virtual ~cODBCBase ()
 
bool isSQLRetOK2 () const noexcept
 
 IUNKNOWN_DISAMBIG (SUPER_t)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from Gray::cSingleton< cODBCEnv >
static cODBCEnv *__stdcall get_Single ()
 
static TYPE2 *__stdcall get_SingleT ()
 
static cODBCEnv &__stdcall I ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< TYPE >
static bool isSingleCreated () noexcept
 
static TYPEget_SingleU () noexcept
 
static TYPEget_Single ()
 
template<class TYPE2 >
static TYPE2 *__stdcall get_SingleCast ()
 
static TYPEI () noexcept
 
- Static Public Member Functions inherited from Gray::cSingletonRegister
static void __stdcall ReleaseModule (HMODULE hMod)
 
- Public Attributes inherited from GrayLib::cODBCBase
const SQLSMALLINT m_nSQLHandleType
 SQL_HANDLE_STMT, SQL_HANDLE_DBC, SQL_HANDLE_ENV. More...
 
SQLHANDLE m_hSQL
 void* SQL_NULL_HANDLE More...
 
SQLRETURN m_nSQLRet
 SQL_SUCCESS. More...
 
- Static Public Attributes inherited from Gray::cSingletonRegister
static cThreadLockFast sm_LockSingle
 common lock for all cSingleton. More...
 
- Protected Member Functions inherited from Gray::cSingleton< cODBCEnv >
 cSingleton (cODBCEnv *pObject, const TYPEINFO_t &rAddrCode=typeid(cODBCEnv)) noexcept
 
virtual ~cSingleton ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< TYPE >
 cSingletonStatic (TYPE *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Member Functions inherited from Gray::cSingletonRegister
 cSingletonRegister (const TYPEINFO_t &rAddrCode) noexcept
 
virtual ~cSingletonRegister ()
 
void RegisterSingleton ()
 
- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 
- Protected Attributes inherited from Gray::cSingletonRegister
HMODULE m_hModuleLoaded
 What modules loaded this ? So singletons can be destroyed if DLL/SO unloads. More...
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< TYPE >
static TYPEsm_pThe = nullptr
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

Register self as a singleton DB Driver. Implements ISQLDriver. SQL_HANDLE_ENV Like using "Provider=MSDASQL" in connection string. (for ODBC). or is it SQLOLEDB ?

Constructor & Destructor Documentation

◆ cODBCEnv()

GrayLib::cODBCEnv::cODBCEnv ( )
Note
The ODBC 3.0 calls wont work unless we do SetSQLAttr. ODBC 2.0 would use SQLAllocEnv

Member Function Documentation

◆ AllocISQLDatabase()

virtual ISQLDatabase* GrayLib::cODBCEnv::AllocISQLDatabase ( const cSQLConnectionString rConnectionString)
inlineoverridevirtual

◆ FillException()

virtual HRESULT GrayLib::cODBCEnv::FillException ( cSQLException pException = nullptr)
inlineoverridevirtual

Reimplemented from GrayLib::cODBCBase.

◆ GetInstalledDrivers()

cArrayString< FILECHAR_t > GrayLib::cODBCEnv::GetInstalledDrivers ( )

get a list of supported ODBC drivers. Use SQLDrivers() since SQLGetInstalledDrivers() is not reliable and non existent in newer Linux SO ?

◆ IUNKNOWN_DISAMBIG()

GrayLib::cODBCEnv::IUNKNOWN_DISAMBIG ( SUPER_t  )

◆ SetSQLAttr()

bool GrayLib::cODBCEnv::SetSQLAttr ( long  nAttribute,
void *  pValue 
)
overridevirtual

The documentation for this class was generated from the following files: