encapsulation of the OCIServer handle, used in OCIPL::OciLogin More...
#include <ocipl.h>
Public Types | |
typedef OciHandle< OCIServer > | super |
typedef OCIServer | HandleType |
Public Member Functions | |
OracleServer (OciEnv &env) | |
~OracleServer () | |
void | attach (const tstring &tnsname) |
void | detach () |
void | alloc () |
void | destroy () |
void | set_attribute (ub4 attrtype, const tstring &str) |
void | set_attribute (ub4 attrtype, ub4 value) |
void | set_attribute (ATTR &attr) |
void | get_attribute (dvoid *attributep, ub4 *sizep, ub4 attrtype) |
void | set_attribute_handle (ub4 attrtype, void *handle) |
operator HandleType * () | |
Static Public Member Functions | |
static ub4 | get_type_id () |
static ub4 | get_attr_id () |
Public Attributes | |
TCHAR | _version_string [2000] |
OciEnv & | _env |
Protected Attributes | |
HandleType * | _handle |
encapsulation of the OCIServer handle, used in OCIPL::OciLogin
Definition at line 802 of file ocipl.h.
typedef OCIServer OCIPL::OciHandle< OCIServer >::HandleType [inherited] |
typedef OciHandle<OCIServer> OCIPL::OracleServer::super |
Reimplemented from OCIPL::OciHandle< OCIServer >.
OCIPL::OracleServer::OracleServer | ( | OciEnv & | env ) | [inline] |
Definition at line 807 of file ocipl.h.
: super(env) { #if ORACLE_VERSION>=82 _version = 0; #endif _version_string[0] = '\0'; }
OCIPL::OracleServer::~OracleServer | ( | ) | [inline] |
void OCIPL::OciHandle< OCIServer >::alloc | ( | ) | [inline, inherited] |
Definition at line 596 of file ocipl.h.
References OCIPL::oci_check_error().
{ if (_handle) destroy(); sword res = OCIHandleAlloc(_env, (dvoid**)&_handle, super::get_type_id(), 0, 0); oci_check_error(_env, res); }
void OCIPL::OracleServer::attach | ( | const tstring & | tnsname ) | [inline] |
Definition at line 824 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIServerAttach(_handle, _env._errh, (OraText*)tnsname.c_str(), (sb4)tnsname.length()*sizeof(TOraText), OCI_DEFAULT); oci_check_error(_env, res); #if ORACLE_VERSION>=82 res = OCIServerRelease(_handle, _env._errh, (OraText*)_version_string, sizeof(_version_string), OCI_HTYPE_SERVER, &_version); #else res = OCIServerVersion(_handle, _env._errh, (OraText*)_version_string, sizeof(_version_string), OCI_HTYPE_SERVER); #endif oci_check_error(_env, res); }
void OCIPL::OciHandle< OCIServer >::destroy | ( | ) | [inline, inherited] |
Definition at line 606 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIHandleFree(_handle, super::get_type_id()); _handle = 0; oci_check_error(_env, res); }
void OCIPL::OracleServer::detach | ( | ) | [inline] |
Definition at line 838 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIServerDetach(_handle, _env._errh, OCI_DEFAULT); oci_check_error(_env, res); #if ORACLE_VERSION>=82 _version = 0; #endif _version_string[0] = '\0'; }
static ub4 OCIPL::OciHandleID< OCIServer >::get_attr_id | ( | ) | [static, inherited] |
void OCIPL::OciHandle< OCIServer >::get_attribute | ( | dvoid * | attributep, |
ub4 * | sizep, | ||
ub4 | attrtype | ||
) | [inline, inherited] |
Definition at line 629 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIAttrGet(_handle, super::get_type_id(), attributep, sizep, attrtype, _env._errh); oci_check_error(_env, res); }
static ub4 OCIPL::OciHandleID< OCIServer >::get_type_id | ( | ) | [static, inherited] |
OCIPL::OciHandle< OCIServer >::operator HandleType * | ( | ) | [inline, inherited] |
void OCIPL::OciHandle< OCIServer >::set_attribute | ( | ub4 | attrtype, |
const tstring & | str | ||
) | [inline, inherited] |
Definition at line 615 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIAttrSet(_handle, super::get_type_id(), (TOraText*)str.c_str(), (ub4)str.length()*sizeof(TOraText), attrtype, _env._errh); oci_check_error(_env, res); }
void OCIPL::OciHandle< OCIServer >::set_attribute | ( | ATTR & | attr ) | [inline, inherited] |
Definition at line 643 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIAttrSet(_handle, super::get_type_id(), attr, 0, ATTR::get_attr_id(), _env._errh); oci_check_error(_env, res); }
void OCIPL::OciHandle< OCIServer >::set_attribute | ( | ub4 | attrtype, |
ub4 | value | ||
) | [inline, inherited] |
Definition at line 622 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIAttrSet(_handle, super::get_type_id(), (OraText*)&value, (ub4)sizeof(value), attrtype, _env._errh); oci_check_error(_env, res); }
void OCIPL::OciHandle< OCIServer >::set_attribute_handle | ( | ub4 | attrtype, |
void * | handle | ||
) | [inline, inherited] |
Definition at line 636 of file ocipl.h.
References OCIPL::oci_check_error().
{ sword res = OCIAttrSet(_handle, super::get_type_id(), handle, 0, attrtype, _env._errh); oci_check_error(_env, res); }
OciEnv& OCIPL::OciHandle< OCIServer >::_env [inherited] |
HandleType* OCIPL::OciHandle< OCIServer >::_handle [protected, inherited] |
TCHAR OCIPL::OracleServer::_version_string[2000] |