[TYPO3-english] DBAL w/ Oracle

Mathieu Sanchez sanchez.math at gmail.com
Mon Dec 1 13:30:15 CET 2008


Hi list,

I developped an extension which has to work with an Oracle Database. So, I
configured DBAL like this:

$TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array (
                '_DEFAULT' => array (
                        'type' => 'native',
                        'config' => array(
                                'username' => '',        // Set by default
(overridden)
                                'password' => '',        // Set by default
(overridden)
                                'host' => '',            // Set by default
(overridden)
                                'database' => '',        // Set by default
(overridden)
                                )
                        ),
                'db_oracle' => array (
                        'type' => 'adodb',
                        'config' => array(
                                'username' => 'username,
                                'password' => 'password',
                                'host' => 'myhost',
                                'database' => 'myDB',
                                'driver' => 'oci8',
                                )
                        ),
                );
$TYPO3_CONF_VARS['EXTCONF']['dbal']['mapping'] = array (
                'tx_msatable_table' => array (
                  'mapTableName' => 'TX_MSATABLE_TABLE',
                  'mapFieldNames' => array(
                    'uid' => 'cid'
                  ),
                ),
);
$TYPO3_CONF_VARS['EXTCONF']['dbal']['table2handlerKeys'] = array (
                'tx_msatable_table'        => 'db_oracle',
                );

And when I create a record for this table, I have this error:
*Fatal error*: Call to a member function _query() on a non-object on
xxxxxxxx/*typo3_src-4.2.3/typo3/sysext/dbal/class.ux_t3lib_db.php

*After debugging the function pointed by the error (exec_INSERTquery), it
seems that before and after the call to
 $this->lastQuery =
$this->INSERTquery($table,$fields_values,$no_quote_fields);

The member $this->lastHandlerKey change its value from 'db_oracle' (which is
good) to '_DEFAULT' !?
Why ? My DBAL configuration is not correct ?

Regards,
Mathieu


More information about the TYPO3-english mailing list