Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [Propel] #366: DB2... any way?

propel
Discussion topic

Back to topic list

Re: [Propel] #366: DB2... any way?

Reply

Author Javier Ruiz <jruizmail at gmail dot com>
Full name Javier Ruiz <jruizmail at gmail dot com>
Date 2008-05-16 04:33:41 PDT
Message Hi rockenbauerjonas <rockenbauerjonas​@gmail.com>,

When I used this, I modified the DBAdapter.php file to append the new
created db2 adapter... then you can use adapter = db2...
For this, open the file /propel/adapter/DBAdapter.php and change the array
that looks like:

    private static $adapters = array(
        'mysql' => 'DBMySQL',
        'mysqli' => 'DBMySQLi',
        'mssql' => 'DBMSSQL',
        'sybase' => 'DBSybase',
        'oracle' => 'DBOracle',
        'pgsql' => 'DBPostgres',
        'sqlite' => 'DBSQLite',
        '' => 'DBNone',
    );


to:


    private static $adapters = array(
        'mysql' => 'DBMySQL',
        'mysqli' => 'DBMySQLi',
        'mssql' => 'DBMSSQL',
        'sybase' => 'DBSybase',
        'oracle' => 'DBOracle',
        'pgsql' => 'DBPostgres',
        'sqlite' => 'DBSQLite',
        'db2' => 'DBDB2',
        '' => 'DBNone',
    );


regards!!

Javi Ruiz.



On Fri, May 16, 2008 at 9:55 AM, Propel <trac at propel dot phpdb dot org> wrote:

> #366: DB2... any way?
>
> --------------------​-------------+------​--------------------​----------------
> Reporter: jruizmail at gmail dot com | Owner: hans
> Type: enhancement | Status: reopened
> Priority: low | Milestone: 1.3
> Component: Runtime (PHP5) | Version: 1.2.0
> Severity: minor | Resolution:
> Keywords: |
>
> --------------------​-------------+------​--------------------​----------------
> Comment (by rockenbauerjonas at gmail dot com):
>
> Hi Hans , I using UnixODBC for connect DB2 database with propel/Symfony
> frameworks but the file DBDB2.PHP don't work with the model's generation
> finally it's working with oracle's driver in propel.ini (propel.database
> = oracle) but after the generation of app/module/class and CRUD's
> generation, the browser get me "Unable to initialize adapters. [wrapped:
> Unsupported Propel driver: odbc: Check your configuration file]"
>
>
> Sorry for my bad english i am a french developer
>
> --
> Ticket URL: <http://propel.phpdb.​org/trac/ticket/366#​comment:11>
> Propel <http://propel.phpdb.org/>
> smart, easy object persistence
>
Attachments

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Re: [Propel] #366: DB2... any way? Javier Ruiz <jruizmail at gmail dot com> Javier Ruiz <jruizmail at gmail dot com> 2008-05-16 04:33:41 PDT
Messages per page: