protected function setDb($transportType = '')
    {
        $transportType = trim($transportType);

        // if extension is specified, use it; else use default db.
        $extensionName = ($transportType) ? $transportType : DBPROTOCOL;

        if (!extension_loaded($extensionName)) {
            throw new \Exception("Extension $extensionName not loaded.");
        }

        // extension is loaded. Set up db transport objects.

        if ($extensionName === 'ibm_db2') {
                $this->setOptions(array('plugPrefix' => 'iPLUG'));
                $this->db = new db2supp();

                $this->setDb2(); // not used in toolkit anymore but keep for backwards compat.
        } elseif ($extensionName === 'odbc') {
                //for odbc will be different default stored procedure call
                $this->setOptions(array('plugPrefix' => 'iPLUGR')); // "R" = "result set" which is how ODBC driver returns param results
                $this->db = new odbcsupp();
        }

        // transport, too, to be generic
        $this->setTransport($this->db);

        return;
    }