void wxPostgresResultSet::Close() { CloseMetaData(); if (m_pResult != NULL) { m_pInterface->GetPQclear()(m_pResult); m_pResult = NULL; } m_FieldLookupMap.clear(); }
void wxMysqlPreparedStatementResultSet::Close() { ResetErrorCodes(); CloseMetaData(); MYSQL_RES* pResultMetadata = m_pInterface->GetMysqlStmtResultMetadata()(m_pStatement); if (!pResultMetadata) { SetErrorCode(wxMysqlDatabase::TranslateErrorCode(m_pInterface->GetMysqlStmtErrno()(m_pStatement))); SetErrorMessage(ConvertFromUnicodeStream(m_pInterface->GetMysqlStmtError()(m_pStatement))); ThrowDatabaseException(); } else { int nParameters = m_pInterface->GetMysqlNumFields()(pResultMetadata); for (int i=0; i<nParameters; i++) { // int nType = m_pResultBindings[i].buffer_type; // if (nType == MYSQL_TYPE_STRING || nType == MYSQL_TYPE_VAR_STRING || nType == MYSQL_TYPE_BLOB // || nType == MYSQL_TYPE_TINY_BLOB || nType == MYSQL_TYPE_MEDIUM_BLOB || nType == MYSQL_TYPE_LONG_BLOB) // { // void* pData = m_pResultBindings[i].buffer; // if (pData != NULL) // { // free(m_pResultBindings[i].buffer); // m_pResultBindings[i].buffer = NULL; // } // } } m_pInterface->GetMysqlFreeResult()(pResultMetadata); } IntToMysqlParameterMap::iterator start = m_BindingWrappers.begin(); IntToMysqlParameterMap::iterator stop = m_BindingWrappers.end(); while (start != stop) { wxDELETE((*start).second); start++; } m_BindingWrappers.clear(); wxDELETEA(m_pResultBindings); if (m_pStatement != NULL) { m_pInterface->GetMysqlStmtFreeResult()(m_pStatement); if (m_bManageStatement) m_pInterface->GetMysqlStmtClose()(m_pStatement); m_pStatement = NULL; } }
void SqliteResultSet::Close() { CloseMetaData(); if (m_bManageStatement) { if (m_pStatement != NULL) { m_pStatement->Close(); wxDELETE(m_pStatement); } } }
void TdsResultSet::Close() { //fprintf(stderr, "TdsResultSet::Close()\n"); CloseMetaData(); //if (m_pResultInfo == NULL) //fprintf(stderr, "m_pResultInfo is still NULL!!!\n"); if (m_pResultInfo != NULL) tds_free_results(m_pResultInfo); FreeResultSets(); }
void wxOdbcResultSet::Close() { CloseMetaData(); if (m_bManageStatement) { if (m_pStatement != NULL) { //m_pStatement->Close(); wxDELETE(m_pStatement); } } }
void OTLResultSet::Close() { try { CloseMetaData(); for (unsigned int i = 0 ; i < m_otldesc.size() ;++i) { delete m_otldesc[i]; } m_otldesc.clear(); if (m_pResultSet != NULL) { delete m_pResultSet; m_pResultSet =NULL; } //fixme /* otl_stream* pStatement = m_pResultSet->getStatement(); if (pStatement) { pStatement->closeResultSet(m_pResultSet); if (m_bManageStatement) { OTL::occi::Connection* pDatabase = pStatement->getConnection(); if (pDatabase) pDatabase->terminateStatement(pStatement); } } */ } catch (otl_exception& e) { SetErrorCode(OTLDatabaseLayer::TranslateErrorCode(e.code)); SetErrorMessage(ConvertFromUnicodeStream((char*)e.msg)); ThrowDatabaseException(); } }