DCL 4.0
Loading...
Searching...
No Matches
OciConnection Class Reference

#include <OciConnection.h>

Inheritance diagram for OciConnection:
SQL::Connection Object

Public Member Functions

void setErrorStatus (SQL::Error _error, sword status, OCIError *pError, bool bPriorReset, const wchar_t *_filename, int _line)
void setErrorEx (const ByteString &_message)
sword OCIHandleAlloc (void **ppHandle, ub4 nHandleType, size_t xtramem_sz=0, void **ppvUserMem=NULL)
sword OCIHandleFree (void *pHandle, ub4 nHandleType)
sword OCIDescriptorAlloc (void **ppDescriptorHandle, ub4 nDescriptorType, size_t xtramem_sz=0, void **ppvUserMem=NULL)
sword OCIDescriptorFree (void *pDescriptorHandle, ub4 nDescriptorType)
OCIEnv * envHandle () const
OCIError * errorHandle () const
OCIError * errorHandle2 () const
OCISvcCtx * svcctxHandle () const
OCISession * sessionHandle () const
 OciConnection (const wchar_t *_serverTitle)
virtual ~OciConnection ()
virtual void destroy ()
virtual bool __open (const char *_connString, size_t _connlen)
virtual bool __close ()
virtual bool __execute (const char *_sql, size_t _sqllen)
virtual bool __startTrans ()
virtual bool __commitTrans ()
virtual bool __rollbackTrans ()
virtual bool __createQueryInstance (SQL::Query **_queryHandleOut)
virtual bool __getErrorMessage (char *_buf, size_t *_buflen)
virtual bool __getServerInfo (char *_buf, size_t *_buflen)
Public Member Functions inherited from SQL::Connection
long refCount () const
long addRef ()
long release ()
bool open (const char *_connString, size_t _connlen)
bool close ()
bool execute (const char *_sql, size_t _sqllen)
bool startTrans ()
bool commitTrans ()
bool rollbackTrans ()
bool getErrorMessage (char *_pbuf, size_t *_pn)
bool getServerInfo (char *_pbuf, size_t *_pn)
bool createQueryInstance (Query **_queryHandleOut)
bool destroyQueryInstance (Query *_queryHandle)
Error errorCode () const
bool canTransact () const
const wchar_t * serverTitle () const
bool inState (unsigned int uState) const
Public Member Functions inherited from Object
virtual String toString () const
String className () const
bool isInstanceOf (const std::type_info &typeinfo) const
virtual const std::type_info & typeInfo () const

Protected Member Functions

bool closeHelper (bool bEnableDebugInfo)
bool executeHelper (const char *pszSQL, size_t n)
Protected Member Functions inherited from SQL::Connection
 Connection (const wchar_t *_serverTitle)
virtual ~Connection ()
Protected Member Functions inherited from Object
virtual ~Object ()
 Object ()

Protected Attributes

OCIEnv * __env
OCIError * __error
OCIError * __error2
OCIServer * __server
OCISvcCtx * __svcctx
OCISession * __session
OCITrans * __trans
bool __serverAttached
bool __sessionStarted
Protected Attributes inherited from SQL::Connection
bool __canTransact
const wchar_t * __serverTitle
Error __errorCode
const wchar_t * __errorFileName
int __errorLine
unsigned int __states

Additional Inherited Members

Public Types inherited from SQL::Connection
enum  State { stClosed = 0x0001 , stOpenned = 0x0002 , stInTransaction = 0x0004 }
Static Public Member Functions inherited from SQL::Connection
static size_t splitConnectionString (const char *_connString, size_t _strlen, ListedByteStringToByteStringMap &_map)
Public Attributes inherited from SQL::Connection
__PROTECTED : void setErrorStatus(Error _errorCode
__PROTECTED const wchar_t * _filename
__PROTECTED const wchar_t int _line

Detailed Description

Definition at line 11 of file OciConnection.h.

Constructor & Destructor Documentation

◆ OciConnection()

OciConnection::OciConnection ( const wchar_t * _serverTitle)

◆ ~OciConnection()

OciConnection::~OciConnection ( )
virtual

Definition at line 68 of file OciConnection.cpp.

69{
70 sword status = OCI_SUCCESS;
71 if (__error) {
72 status = OCIHandleFree(__error, OCI_HTYPE_ERROR);
73 if (status != OCI_SUCCESS) {
74 __DCL_TRACE0_N(__T("OCIHandleFree Fail! : __error\n"));
75 }
76 __error = NULL;
77 }
78
79 if (__env) {
80 status = OCIHandleFree(__env, OCI_HTYPE_ENV);
81 if (status != OCI_SUCCESS) {
82 __DCL_TRACE0_N(__T("OCIHandleFree Fail! : __env\n"));
83 }
84 __env = NULL;
85 }
86}
#define NULL
Definition Config.h:340
#define __DCL_TRACE0_N(fmt)
Definition IFXField.cpp:37
#define __T(str)
Definition Object.h:44
sword OCIHandleFree(void *pHandle, ub4 nHandleType)
OCIError * __error

Member Function Documentation

◆ __close()

bool OciConnection::__close ( )
virtual

Implements SQL::Connection.

Definition at line 330 of file OciConnection.cpp.

331{
332 return closeHelper(true);
333}
bool closeHelper(bool bEnableDebugInfo)

◆ __commitTrans()

bool OciConnection::__commitTrans ( )
virtual

Implements SQL::Connection.

Definition at line 550 of file OciConnection.cpp.

551{
553 sword status = ::OCITransCommit(__svcctx, __error, OCI_DEFAULT);
554 if (status != OCI_SUCCESS) {
556 return false;
557 }
559 return true;
560}
#define __DCL_ASSERT(expr)
Definition Object.h:371
#define __SET_ERROR(_errorCode)
Definition SQLCore.cpp:150
#define __UNSET_STATE(state)
Definition SQLCore.h:431
OCISvcCtx * __svcctx
@ eServerError
Definition SQLCore.h:21

◆ __createQueryInstance()

bool OciConnection::__createQueryInstance ( SQL::Query ** _queryHandleOut)
virtual

Implements SQL::Connection.

Definition at line 574 of file OciConnection.cpp.

575{
576 __DCL_ASSERT(_queryHandleOut != NULL);
577 SQL::Query* pNewQuery = new OciQuery(this);
578 if (!pNewQuery) {
580 return false;
581 }
582 *_queryHandleOut = pNewQuery;
583 return true;
584}
@ eOutOfMemory
Definition SQLCore.h:24

◆ __execute()

bool OciConnection::__execute ( const char * _sql,
size_t _sqllen )
virtual

Implements SQL::Connection.

Definition at line 515 of file OciConnection.cpp.

516{
517 if(executeHelper(_sql, n)) {
518 switch(__GetStmtType(_sql)) {
519 case StmtTransBegin :
520 __SET_STATE(Connection::stInTransaction);
521 break;
522 case StmtTransEnd :
523 __UNSET_STATE(Connection::stInTransaction);
524 break;
525 case StmtOther :
526 default :
527 ;
528 }
529
530 return true;
531 }
532
533 return false;
534}
@ StmtTransEnd
@ StmtOther
@ StmtTransBegin
#define __SET_STATE(state)
Definition SQLCore.h:430
void CharsetConvertException *size_t n
Definition SQLField.cpp:253
bool executeHelper(const char *pszSQL, size_t n)

◆ __getErrorMessage()

bool OciConnection::__getErrorMessage ( char * _buf,
size_t * _buflen )
virtual

Implements SQL::Connection.

Definition at line 588 of file OciConnection.cpp.

589{
590 size_t len = 0;
591 if (__lastStatus == OCI_ERROR) {
592 sb4 nErrorCode = 0;
593 if (::OCIErrorGet(
594 __error,
595 (ub4)1,
596 (text*)NULL,
597 &nErrorCode,
598 (text*)_buf,
599 *_buflen,
600 OCI_HTYPE_ERROR
601 ) != OCI_SUCCESS) {
602 // 드라이버 버그!!
603 *_buflen = 0;
604 return false;
605 }
606 len = strlen(_buf);
607 for(; len > 0; len--) {
608 if (!isspace((unsigned)_buf[len - 1]))
609 break;
610 }
611 }
612 else {
613 const char* psz = "";
614 switch(__lastStatus) {
615 case OCI_SUCCESS_WITH_INFO :
616 psz = "OCI_SUCCESS_WITH_INFO";
617 break;
618 case OCI_RESERVED_FOR_INT_USE :
619 psz = "OCI_RESERVED_FOR_INT_USE";
620 break;
621 case OCI_NO_DATA :
622 psz = "OCI_NO_DATA";
623 break;
624 case OCI_ERROR :
625 psz = "OCI_ERROR";
626 break;
627 case OCI_INVALID_HANDLE :
628 psz = "OCI_INVALID_HANDLE";
629 break;
630 case OCI_NEED_DATA :
631 psz = "OCI_NEED_DATA";
632 break;
633 case OCI_STILL_EXECUTING :
634 psz = "OCI_STILL_EXECUTING";
635 break;
636 case OCI_CONTINUE :
637 psz = "OCI_CONTINUE";
638 break;
639 case OCI_ROWCBK_DONE :
640 psz = "OCI_ROWCBK_DONE";
641 break;
642 default :
643 // __DCL_ASSERT(false);
644 ;
645 }
646
647 len = strlen(psz);
648 if (*_buflen < len)
649 len = *_buflen;
650
651 strncpy(_buf, psz, len);
652 }
653
654 if (!__errorMessageEx.isEmpty()) {
655 ByteString str;
656 if (len)
657 str = ", " + __errorMessageEx;
658 else
659 str = __errorMessageEx;
660
661 if ((*_buflen - len) >= str.length()) {
662 // 버퍼가 남이 있다면
663
664 // 이전에 len > 0 이면 버퍼의 시작위치를 옮기다.
665 _buf += len;
666
667 strncpy(_buf, str.data(), str.length());
668 len += str.length();
669 }
670 }
671
672 if (len)
673 *_buflen = len;
674 else {
675 const char* psz = "Driver Bug!!";
676 len = strlen(psz);
677 if (*_buflen > len)
678 *_buflen = len;
679 strncpy(_buf, psz, *_buflen);
680 }
681
682 return true;
683}
size_t len

◆ __getServerInfo()

bool OciConnection::__getServerInfo ( char * _buf,
size_t * _buflen )
virtual

Implements SQL::Connection.

Definition at line 685 of file OciConnection.cpp.

686{
687 sword status = ::OCIServerVersion(
688 __server,
689 __error,
690 (text*)_buf,
691 *_buflen,
692 OCI_HTYPE_SERVER
693 );
694 if (status != OCI_SUCCESS) {
696 return false;
697 }
698 *_buflen = strlen(_buf);
699 return true;
700}
OCIServer * __server

◆ __open()

bool OciConnection::__open ( const char * _connString,
size_t _connlen )
virtual

Implements SQL::Connection.

Definition at line 101 of file OciConnection.cpp.

102{
103 ListedByteStringToByteStringMap map;
104 Connection::splitConnectionString(_connString, _connlen, map);
105
106 ByteString strDatabase = map["DATABASE"];
107 ByteString strUser = map["USER"];
108 ByteString strPassword = map["PASSWORD"];
109 ByteString strMode = map["MODE"];
110
111 ub4 nOperationMode = OCI_DEFAULT;
112 if (!strMode.isEmpty()) {
113 if (!strMode.compareNoCase("SYSDBA"))
114 nOperationMode = OCI_SYSDBA;
115 else if (!strMode.compareNoCase("SYSOPER"))
116 nOperationMode = OCI_SYSOPER;
117 else {
119 return false;
120 }
121 }
122
123 if (strUser.isEmpty()) {
125 return false;
126 }
127
128 sword status = OCI_SUCCESS;
129 // __env, __error은 ~OciConnection에서 OCIHandleFree한다.
130 // close후 다시 open할 수 있다.
131 if (!__env) {
132 status = ::OCIEnvCreate(
133 &__env,
134 OCI_ENV_NO_MUTEX | OCI_THREADED | OCI_OBJECT,
135 (void*)0, 0, 0, 0,
136 (size_t)0, (void**)0
137 );
138 if (status != OCI_SUCCESS) {
140 goto __on_error;
141 }
142 }
143
144 if (!__error) {
145 status = OCIHandleAlloc((void**)&__error, OCI_HTYPE_ERROR);
146 if (status != OCI_SUCCESS) {
148 goto __on_error;
149 }
150 }
151
152 status = OCIHandleAlloc((void**)&__error2, OCI_HTYPE_ERROR);
153 if (status != OCI_SUCCESS) {
155 goto __on_error;
156 }
157
158 status = OCIHandleAlloc((void**)&__server, OCI_HTYPE_SERVER);
159 if (status != OCI_SUCCESS) {
161 goto __on_error;
162 }
163
164 status = OCIHandleAlloc((void**)&__svcctx, OCI_HTYPE_SVCCTX);
165 if (status != OCI_SUCCESS) {
167 goto __on_error;
168 }
169
170 status = OCIHandleAlloc((void**)&__session, OCI_HTYPE_SESSION);
171 if (status != OCI_SUCCESS) {
173 goto __on_error;
174 }
175
176 status = OCIHandleAlloc((void**)&__trans, OCI_HTYPE_TRANS);
177 if (status != OCI_SUCCESS) {
179 goto __on_error;
180 }
181
182 status = ::OCIServerAttach(
183 __server,
184 __error,
185 strDatabase.isEmpty()? NULL : (text*)strDatabase.data(),
186 strDatabase.isEmpty()? 0 : strDatabase.length(),
187 OCI_DEFAULT
188 );
189 if (status != OCI_SUCCESS) {
191 goto __on_error;
192 }
193
194#if defined(__DCL_DEBUG) && __TRACE_THIS
195 char buf[256];
196 status = OCINlsGetInfo(__env, __error,
197 (OraText*) buf, sizeof(buf), OCI_NLS_CHARACTER_SET);
198 if (status == OCI_SUCCESS) {
199 __DCL_TRACE1_N(L"[%hs]\n", buf);
200 }
201 else {
202 __DCL_TRACE1_N(L"[%d]\n", status);
203 }
204 status = OCINlsGetInfo(__env, __error,
205 (OraText*)buf, sizeof(buf), OCI_NLS_LANGUAGE);
206 if (status == OCI_SUCCESS) {
207 __DCL_TRACE1_N(L"[%hs]\n", buf);
208 }
209 else {
210 __DCL_TRACE1_N(L"[%d]\n", status);
211 }
212 status = OCINlsGetInfo(__env, __error,
213 (OraText*)buf, sizeof(buf), OCI_NLS_ABLANGUAGE);
214 if (status == OCI_SUCCESS) {
215 __DCL_TRACE1_N(L"[%hs]\n", buf);
216 }
217 else {
218 __DCL_TRACE1_N(L"[%d]\n", status);
219 }
220 status = OCINlsGetInfo(__env, __error,
221 (OraText*)buf, sizeof(buf), OCI_NLS_TERRITORY);
222 if (status == OCI_SUCCESS) {
223 __DCL_TRACE1_N(L"[%hs]\n", buf);
224 }
225 else {
226 __DCL_TRACE1_N(L"[%d]\n", status);
227 }
228#endif
229
230 __serverAttached = true;
231
232 status = ::OCIAttrSet(
233 __svcctx,
234 OCI_HTYPE_SVCCTX,
235 __server,
236 (ub4)0,
237 OCI_ATTR_SERVER,
238 __error
239 );
240 if (status != OCI_SUCCESS) {
242 goto __on_error;
243 }
244
245 status = ::OCIAttrSet(
246 __session,
247 OCI_HTYPE_SESSION,
248 (void*)strUser.data(),
249 strUser.length(),
250 OCI_ATTR_USERNAME,
251 __error
252 );
253 if (status != OCI_SUCCESS) {
255 goto __on_error;
256 }
257
258 status = ::OCIAttrSet(
259 __session,
260 OCI_HTYPE_SESSION,
261 (void*)strPassword.data(),
262 strPassword.length(),
263 OCI_ATTR_PASSWORD,
264 __error
265 );
266 if (status != OCI_SUCCESS) {
268 goto __on_error;
269 }
270
271 status = ::OCISessionBegin(
272 __svcctx,
273 __error,
274 __session,
275 OCI_CRED_RDBMS,
276 nOperationMode
277 );
278 if (status != OCI_SUCCESS) {
280 goto __on_error;
281 }
282
283 __sessionStarted = true;
284 status = ::OCIAttrSet(
285 __svcctx,
286 OCI_HTYPE_SVCCTX,
287 __server,
288 (ub4)0,
289 OCI_ATTR_SERVER,
290 __error
291 );
292 if (status != OCI_SUCCESS) {
294 goto __on_error;
295 }
296
297 status = ::OCIAttrSet(
298 __svcctx,
299 OCI_HTYPE_SVCCTX,
300 (void*)__session,
301 0,
302 OCI_ATTR_SESSION,
303 __error
304 );
305 if (status != OCI_SUCCESS) {
307 goto __on_error;
308 }
309
310 status = ::OCIAttrSet(
311 __svcctx,
312 OCI_HTYPE_SVCCTX,
313 __trans,
314 0,
315 OCI_ATTR_TRANS,
316 __error
317 );
318 if (status != OCI_SUCCESS) {
320 goto __on_error;
321 }
322
323 return true;
324
325__on_error:
326 closeHelper(false);
327 return false;
328}
#define __DCL_TRACE1_N(fmt, arg)
ByteBuffer * buf
OCISession * __session
OCIError * __error2
sword OCIHandleAlloc(void **ppHandle, ub4 nHandleType, size_t xtramem_sz=0, void **ppvUserMem=NULL)
OCITrans * __trans
@ eInvalidConnectionString
Definition SQLCore.h:31

◆ __rollbackTrans()

bool OciConnection::__rollbackTrans ( )
virtual

Implements SQL::Connection.

Definition at line 562 of file OciConnection.cpp.

563{
565 sword status = ::OCITransRollback(__svcctx, __error, OCI_DEFAULT);
566 if (status != OCI_SUCCESS) {
568 return false;
569 }
571 return true;
572}

◆ __startTrans()

bool OciConnection::__startTrans ( )
virtual

Implements SQL::Connection.

Definition at line 536 of file OciConnection.cpp.

537{
539 uword timeout = 60;
540 ub4 flags = OCI_TRANS_READWRITE;
541 sword status = ::OCITransStart(__svcctx, __error, timeout, flags);
542 if (status != OCI_SUCCESS) {
544 return false;
545 }
546 __SET_STATE(Connection::stInTransaction);
547 return true;
548}

◆ closeHelper()

bool OciConnection::closeHelper ( bool bEnableDebugInfo)
protected

Definition at line 335 of file OciConnection.cpp.

336{
337 sword status = OCI_SUCCESS;
338 OCIError* pError = __error;
339 bool bReturn = true;
340
341 if (!_normal) {
342 // 이전에 오류가 있었다.
343 // cleanup에서 __error2가 사용된다.
344 pError = __error2;
345 }
346
347 if (__sessionStarted) {
348 status = ::OCISessionEnd(
349 __svcctx,
350 pError,
351 __session,
352 OCI_DEFAULT
353 );
354 if ((status != OCI_SUCCESS) && _normal) {
356 bReturn = false;
357 }
358 __sessionStarted = false;
359 }
360
361 if (__serverAttached) {
362 status = ::OCIServerDetach(
363 __server,
364 pError,
365 OCI_DEFAULT
366 );
367 if ((status != OCI_SUCCESS) && _normal) {
369 bReturn = false;
370 }
371 __serverAttached = false;
372 }
373
374 if (__trans) {
375 status = OCIHandleFree(__trans, OCI_HTYPE_TRANS);
376 if ((status != OCI_SUCCESS) && _normal) {
378 bReturn = false;
379 }
380 __session = NULL;
381 }
382
383 if (__session) {
384 status = OCIHandleFree(__session, OCI_HTYPE_SESSION);
385 if ((status != OCI_SUCCESS) && _normal) {
387 bReturn = false;
388 }
389 __session = NULL;
390 }
391
392 if (__server) {
393 status = OCIHandleFree(__server, OCI_HTYPE_SERVER);
394 if ((status != OCI_SUCCESS) && _normal) {
396 bReturn = false;
397 }
398 __server = NULL;
399 }
400
401 if (__svcctx) {
402 status = OCIHandleFree(__svcctx, OCI_HTYPE_SVCCTX);
403 if ((status != OCI_SUCCESS) && _normal) {
405 bReturn = false;
406 }
407 __svcctx = NULL;
408 }
409
410 if (__error2) {
411 status = OCIHandleFree(__error2, OCI_HTYPE_ERROR);
412 if ((status != OCI_SUCCESS) && _normal) {
414 bReturn = false;
415 }
416 __error2 = NULL;
417 }
418
419 return bReturn;
420}

◆ destroy()

void OciConnection::destroy ( )
virtual

파생클래스에서 new 연산자를 override했거나, 추가적인 행위가 필요하다면 이것도 override하라

Implements SQL::Connection.

Definition at line 88 of file OciConnection.cpp.

89{
90 delete this;
91}

◆ envHandle()

OCIEnv * OciConnection::envHandle ( ) const
inline

Definition at line 51 of file OciConnection.h.

51{ return __env; }

◆ errorHandle()

OCIError * OciConnection::errorHandle ( ) const
inline

Definition at line 52 of file OciConnection.h.

52{ return __error; }

◆ errorHandle2()

OCIError * OciConnection::errorHandle2 ( ) const
inline

Definition at line 53 of file OciConnection.h.

53{ return __error2; }

◆ executeHelper()

bool OciConnection::executeHelper ( const char * pszSQL,
size_t n )
protected

Definition at line 422 of file OciConnection.cpp.

423{
424 OCIStmt* pStmt = NULL;
425 sword status = OCIHandleAlloc((void**)&pStmt, OCI_HTYPE_STMT);
426 if (status != OCI_SUCCESS) {
428 goto __on_error;
429 }
430
431 status = ::OCIStmtPrepare(
432 pStmt,
433 __error,
434 (CONST text*)_sql,
435 _sqllen,
436 OCI_NTV_SYNTAX,
437 OCI_DEFAULT
438 );
439 if (status != OCI_SUCCESS) {
441 goto __on_error;
442 }
443
444 ub2 nStmtType;
445 status = ::OCIAttrGet(
446 pStmt,
447 OCI_HTYPE_STMT,
448 &nStmtType,
449 NULL,
450 OCI_ATTR_STMT_TYPE,
451 __error
452 );
453 if (status != OCI_SUCCESS) {
455 goto __on_error;
456 }
457
458 status = ::OCIStmtExecute(
459 __svcctx,
460 pStmt,
461 __error,
462 1, //(m_nStmtType == OCI_STMT_SELECT) ? 0 : 1,
463 0,
464 NULL,
465 NULL,
466 OCI_DEFAULT
467 );
468 if (status != OCI_SUCCESS) {
470 goto __on_error;
471 }
472
473 OCIHandleFree(pStmt, OCI_HTYPE_STMT);
474
475 return true;
476
477__on_error:
478 if (pStmt)
479 OCIHandleFree(pStmt, OCI_HTYPE_STMT);
480
481 return false;
482}

◆ OCIDescriptorAlloc()

sword OciConnection::OCIDescriptorAlloc ( void ** ppDescriptorHandle,
ub4 nDescriptorType,
size_t xtramem_sz = 0,
void ** ppvUserMem = NULL )
inline

Definition at line 117 of file OciConnection.h.

121{
123 return ::OCIDescriptorAlloc(__env,
124 ppDescriptorHandle,
125 nDescriptorType,
126 xtramem_sz,
127 ppvUserMem);
128}

◆ OCIDescriptorFree()

sword OciConnection::OCIDescriptorFree ( void * pDescriptorHandle,
ub4 nDescriptorType )
inline

Definition at line 130 of file OciConnection.h.

133{
134 __DCL_ASSERT(pDescriptorHandle != NULL);
135 return ::OCIDescriptorFree(pDescriptorHandle, nDescriptorType);
136}

◆ OCIHandleAlloc()

sword OciConnection::OCIHandleAlloc ( void ** ppHandle,
ub4 nHandleType,
size_t xtramem_sz = 0,
void ** ppvUserMem = NULL )
inline

Definition at line 98 of file OciConnection.h.

102{
104 return ::OCIHandleAlloc(__env,
105 ppHandle,
106 nHandleType,
107 xtramem_sz,
108 ppvUserMem);
109}

◆ OCIHandleFree()

sword OciConnection::OCIHandleFree ( void * pHandle,
ub4 nHandleType )
inline

Definition at line 111 of file OciConnection.h.

112{
113 __DCL_ASSERT(pHandle != NULL);
114 return ::OCIHandleFree(pHandle, nHandleType);
115}

◆ sessionHandle()

OCISession * OciConnection::sessionHandle ( ) const
inline

Definition at line 56 of file OciConnection.h.

56{ return __session; }

◆ setErrorEx()

void OciConnection::setErrorEx ( const ByteString & _message)
inline

Definition at line 91 of file OciConnection.h.

92{
93 __errorMessageEx = _message;
94 __lastStatus = 0; // OCI_SUCCESS
95 __lastError = NULL;
96}

◆ setErrorStatus()

void OciConnection::setErrorStatus ( SQL::Error _error,
sword status,
OCIError * pError,
bool bPriorReset,
const wchar_t * _filename,
int _line )
inline

Definition at line 75 of file OciConnection.h.

81{
82 Connection::setErrorStatus(_error, _filename, _line);
83
84 __lastStatus = status;
85 __lastError = pError;
86
87 if (bPriorReset && !__errorMessageEx.isEmpty())
88 __errorMessageEx.clear();
89}
__PROTECTED const wchar_t int _line
Definition SQLCore.h:390
__PROTECTED const wchar_t * _filename
Definition SQLCore.h:390

◆ svcctxHandle()

OCISvcCtx * OciConnection::svcctxHandle ( ) const
inline

Definition at line 55 of file OciConnection.h.

55{ return __svcctx; }

Member Data Documentation

◆ __env

OCIEnv* OciConnection::__env
protected

Definition at line 36 of file OciConnection.h.

◆ __error

OCIError* OciConnection::__error
protected

Definition at line 37 of file OciConnection.h.

◆ __error2

OCIError* OciConnection::__error2
protected

Definition at line 38 of file OciConnection.h.

◆ __server

OCIServer* OciConnection::__server
protected

Definition at line 40 of file OciConnection.h.

◆ __serverAttached

bool OciConnection::__serverAttached
protected

Definition at line 45 of file OciConnection.h.

◆ __session

OCISession* OciConnection::__session
protected

Definition at line 42 of file OciConnection.h.

◆ __sessionStarted

bool OciConnection::__sessionStarted
protected

Definition at line 46 of file OciConnection.h.

◆ __svcctx

OCISvcCtx* OciConnection::__svcctx
protected

Definition at line 41 of file OciConnection.h.

◆ __trans

OCITrans* OciConnection::__trans
protected

Definition at line 43 of file OciConnection.h.


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