4
I need to connect to a Progress database via php I am using the framework Laravel 5.2 however the same according to the documentation only has support for Mysql, Postgres, Sqlite and SQL Server databases.
Searching I found very little on how to connect with this DB through PHP one of the few things I found was on how to connect through PDO so I did the code below.
$dsn = 'odbc:host=xxx.xx.xxx.x;dbname=minhabase;port=99999DataSource:minhadatasource;';
$user = 'usuario';
$password = 'minhasenha';
$pdo = new \PDO($dsn, $user, $password);
Change php.ini (enable Pdo_odbc)
extension=php_pdo_odbc.dll
with the above code appears the following error Pdoexception in Paginascontroller.php line 36:
SQLSTATE[IM002] Sqldriverconnect: 0 [Microsoft][ODBC Driver Manager] Name of data source not found and no default driver specified
Does anyone have any tips on how to resolve? or has anyone connected to this db through php
That’s not postgres, that’s odbc.
– rray
Buddy, before you try to sneak into Laravel and use the direct PDO, look for a library for support. I see many programmers wanting to use a PDO instance in Laravel, and it already has its own ORM. In this case, I would say that it was better not to use framework.
– Wallace Maxters
It’s not just changing the database string into a file (if I’m not mistaken the database.php) ?
– rray
Based on the @rray comment, you can put this here
– Wallace Maxters
Isn’t that a technology called Progress (4GL) that uses SQL Server database? You are not confusing a type of integrated technology with database no?
– Miguel Batista
@Miguelbatista Poisé had never heard of Progress as database but I asked the professional I have contact to perform this integration and he answered me so database and Progress compatible with the sql-92 standard
– Junior
I already took a look at the topic: http://stackoverflow.com/questions/30480385/laravel-5-with-postgres-sql ?
– Fernando