0

In my symfony 3.3.2 project , I want to connect to sage database using odbc sage. I create a new dsn named : GestCom_Sage100.

I tried to connect to this dataSource using symfony but I got this error :

The given 'driver' SAGE Gestion commeriale 100 is unknown, Doctrine currently 
supports only the following drivers: pdo_mysql, pdo_sqlite, pdo_pgsql, 
pdo_oci, oci8, ibm_db2, pdo_sqlsrv, mysqli, drizzle_pdo_mysql, sqlanywhere, 
sqlsrv

here is my config.yml:

# Doctrine Configuration
doctrine:
dbal:
    default_connection: default
    connections:
        default:
            driver: pdo_pgsql
            host: '%database_host%'
            port: '%database_port%'
            dbname: '%database_name%'
            user: '%database_user%'
            password: '%database_password%'
            charset: UTF8                
        sage:
            driver: SAGE Gestion commeriale 100
            host: 'localhost'
            dbname: 'GestCom_Sage100'
            user: '****'
            password: '*****'

Even Doctrine2 documentation http://doctrine-orm.readthedocs.io/projects/doctrine-dbal/en/latest/reference/configuration.html#pdo-oci-oci8

kcrisman
  • 4,374
  • 20
  • 41
Sabra
  • 177
  • 2
  • 19
  • `SAGE Gestion commeriale 100` is not valid driver, you shall use driver from the list that corresponds to this database. – Kacper Oct 14 '17 at 14:58
  • Sounds like you need pdo_odbc though you probably need to install it: http://php.net/manual/en/ref.pdo-odbc.php – Cerad Oct 14 '17 at 16:19

1 Answers1

-1
# Doctrine Configuration
doctrine:
    dbal:
        driver:         YOUR_DRIVER
        driver_class:  YOUR_DRIVER_CLASS_NAMESPACE
Nisarg Shah
  • 14,151
  • 6
  • 34
  • 55
Rohan Warwar
  • 810
  • 1
  • 13
  • 27