00001 #include <iostream> 00002 #include "TestBase.h" 00003 00004 using namespace std; 00005 00006 TestBase::TestBase() { 00007 } 00008 00009 TestBase::~TestBase() { 00010 } 00011 00012 void TestBase::setUserPass(const char *user, const char *pass) { 00013 strncpy(_icss.databaseUsername, user, DB_USERNAME_LEN); 00014 strncpy(_icss.databasePassword, pass, DB_PASSWORD_LEN); 00015 } 00016 00017 void TestBase::SetUp() { 00018 } 00019 00020 void TestBase:: TearDown() { 00021 } 00022 00023 void TestBase::PrintRows(int stmt) { 00024 int rowCnt = cllGetRowCount(&_icss, stmt); 00025 cout << "rowcnt=" << rowCnt << endl; 00026 for (int row=0; row < rowCnt;row++) { 00027 if(cllGetRow(&_icss, stmt) != 0) { 00028 continue; 00029 } 00030 int colCnt = _icss.stmtPtr[stmt]->numOfCols; 00031 if (colCnt == 0) { 00032 break; 00033 } 00034 for(int col=0; col < colCnt; col++) { 00035 cout << "[" << row << "][" << col << "]=" << 00036 _icss.stmtPtr[stmt]->resultValue[col] << endl; 00037 } 00038 } 00039 }