#include <odbcDesc.h>
Inheritance diagram for CSqlOdbcDescList:
Public Member Functions | |
CSqlOdbcDescList (int descType) | |
SQLRETURN | delDesc (CSqlOdbcDesc *node) |
void | freeAllDesc (void) |
SQLRETURN | getDescWithColNum (int colNum, CSqlOdbcDesc **out) |
Data Fields | |
int | type_ |
Definition at line 40 of file odbcDesc.h.
CSqlOdbcDescList::CSqlOdbcDescList | ( | int | descType | ) |
SQLRETURN CSqlOdbcDescList::delDesc | ( | CSqlOdbcDesc * | node | ) |
Definition at line 17 of file odbcDesc.cxx.
References SQL_ERROR, and SQL_SUCCESS.
Referenced by CSqlOdbcStmt::SQLBindCol().
00018 { 00019 CSqlOdbcDescList::iterator iter; 00020 iter = this->begin(); 00021 while( iter != this->end() ) 00022 { 00023 if( *iter == node ) 00024 { 00025 delete node; 00026 this->erase( iter ); 00027 return( SQL_SUCCESS ); 00028 } 00029 iter++; 00030 } 00031 00032 return(SQL_ERROR); 00033 }
Here is the caller graph for this function:
void CSqlOdbcDescList::freeAllDesc | ( | void | ) |
Definition at line 35 of file odbcDesc.cxx.
References size, SQL_C_BINARY, SQL_C_CHAR, SQL_DESC_IMP, and type_.
Referenced by CSqlOdbcStmt::SQLFreeStmt().
00036 { 00037 int size=(int)this->size(); 00038 if(size > 0) 00039 { 00040 CSqlOdbcDescList::iterator iter; 00041 iter = this->begin(); 00042 while( iter != this->end() ) 00043 { 00044 if(type_ == SQL_DESC_IMP) 00045 { 00046 if((*iter)->dataPtr_!= NULL) 00047 { 00048 if((*iter)->cType_ == SQL_C_CHAR || (*iter)->cType_ == SQL_C_BINARY) 00049 delete [] (*iter)->dataPtr_; 00050 else 00051 delete (*iter)->dataPtr_; 00052 (*iter)->dataPtr_=NULL; 00053 } 00054 } 00055 delete *iter; 00056 *iter=NULL; 00057 iter++; 00058 } 00059 this->clear(); 00060 } 00061 }
Here is the caller graph for this function:
SQLRETURN CSqlOdbcDescList::getDescWithColNum | ( | int | colNum, | |
CSqlOdbcDesc ** | out | |||
) |
Definition at line 63 of file odbcDesc.cxx.
References SQL_ERROR, and SQL_SUCCESS.
Referenced by CSqlOdbcStmt::SQLBindCol(), and CSqlOdbcStmt::SQLBindParameter().
00064 { 00065 CSqlOdbcDescList::iterator iter; 00066 iter = this->begin(); 00067 while( iter != this->end() ) 00068 { 00069 if( colNum == (*iter)->col_ ) 00070 { 00071 *out = *iter; 00072 return( SQL_SUCCESS ); 00073 } 00074 iter++; 00075 } 00076 00077 return( SQL_ERROR ); 00078 }
Here is the caller graph for this function: