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

#include <cODBCEnv.h>

Inheritance diagram for GrayLib::cODBCDatabase:
GrayLib::cODBCBase ISQLDatabase Gray::cRefBase IUnknown

Public Member Functions

 cODBCDatabase (cODBCBase *pParent)
 
virtual bool SetSQLAttr (long nAttribute, void *pValue) override
 
virtual HRESULT OpenConnect (const cSQLConnectionString &rConnectionString, INT_PTR hParentWnd) override
 
bool GetInfo (SQLUSMALLINT nInfoType, void *pValue, OUT SQLSMALLINT *pnValueLength)
 
bool GetInfoStr (SQLUSMALLINT nInfoType, OUT cStringA &sVal)
 
virtual HRESULT ReadConfigDB (OUT cSQLConfigDB &cfg) override
 
virtual bool Disconnect () override
 
virtual HRESULT EndTransaction (bool bCommit) override
 
virtual ISQLStatementAllocISQLStatement (const cSQLCmd &oCmd) override
 
 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 ()
 

Additional Inherited Members

- 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...
 

Detailed Description

SQL_HANDLE_DBC. implements ISQLDatabase

Constructor & Destructor Documentation

◆ cODBCDatabase()

GrayLib::cODBCDatabase::cODBCDatabase ( cODBCBase pParent)
inline

Member Function Documentation

◆ AllocISQLStatement()

virtual ISQLStatement* GrayLib::cODBCDatabase::AllocISQLStatement ( const cSQLCmd oCmd)
inlineoverridevirtual

◆ Disconnect()

bool GrayLib::cODBCDatabase::Disconnect ( )
overridevirtual

◆ EndTransaction()

HRESULT GrayLib::cODBCDatabase::EndTransaction ( bool  bCommit)
overridevirtual

ISQLDatabase Flush all transactions since last flush. This does nothing if SQL_ATTR_AUTOCOMMIT is active.

◆ FillException()

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

Reimplemented from GrayLib::cODBCBase.

◆ GetInfo()

bool GrayLib::cODBCDatabase::GetInfo ( SQLUSMALLINT  nInfoType,
void *  pValue,
OUT SQLSMALLINT *  pnValueLength 
)

Assume OpenConnect() has been called. Get Info about the db.

  • nInfoType = SQL_DATABASE_NAME
  • pnValueLength = can be nullptr

◆ GetInfoStr()

bool GrayLib::cODBCDatabase::GetInfoStr ( SQLUSMALLINT  nInfoType,
OUT cStringA sVal 
)
inline

Assume OpenConnect() has been called. Get Info about the db.

  • InfoType = SQL_DATABASE_NAME

◆ IUNKNOWN_DISAMBIG()

GrayLib::cODBCDatabase::IUNKNOWN_DISAMBIG ( SUPER_t  )

◆ OpenConnect()

HRESULT GrayLib::cODBCDatabase::OpenConnect ( const cSQLConnectionString rConnectionString,
INT_PTR  hParentWnd 
)
overridevirtual

◆ ReadConfigDB()

HRESULT GrayLib::cODBCDatabase::ReadConfigDB ( OUT cSQLConfigDB cfg)
overridevirtual

ISQLDatabase Populate db config info. Assume OpenConnect() has been called. Does it support transactions ? CanTransact() Multiple statements before using the SQL_COMMIT ?

◆ SetSQLAttr()

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

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