public function prepareExport()
    {
        $oDB = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sHeapTable = $this->_getHeapTableName();

        // #1070 Saulius 2005.11.28
        // check mySQL version
        $oRs = $oDB->select("SHOW VARIABLES LIKE 'version'");
        $sTableCharset = $this->_generateTableCharSet($oRs->fields[1]);

        // create heap table
        if (!($this->_createHeapTable($sHeapTable, $sTableCharset))) {
            // error
            \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("Could not create HEAP Table {$sHeapTable}\n<br>");
        }

        $sCatAdd = $this->_getCatAdd(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("acat"));
        if (!$this->_insertArticles($sHeapTable, $sCatAdd)) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("Could not insert Articles in Table {$sHeapTable}\n<br>");
        }

        $this->_removeParentArticles($sHeapTable);
        $this->_setSessionParams();

        // get total cnt
        return $oDB->getOne("select count(*) from {$sHeapTable}");
    }