protected function getNewGUID($conn, $dbType, $table=null, $column=null)
    {
        $dbType = strtoupper($dbType);
        if ($dbType == 'mysql' || $dbType == 'PDO_DBLIB')
            $sql = "select uuid()";
        else if ($dbType == 'oracle' || $dbType == 'oci8' || $dbType == 'PDO_OCI')
            $sql = "select rawtohex(sys_guid()) from dual";
        else if ($dbType == 'msql' || $dbType == 'PDO_MYSQL')
            $sql = "select newid()";
        else
            throw new Exception("Error in generating new GUID: unsupported database type.");
        // execute sql to get the id
        $newId = $this->_getIdWithSql($conn, $sql);
        if ($newId === false)
            throw new Exception("Error in generating new GUID: unable to get a valid id.");
        return $newId;
    }