andreossido / laravel-odbc

ODBC integration for Laravel framework
35 stars 29 forks source link

Can't make it to work #4

Closed patchido closed 4 years ago

patchido commented 5 years ago

i am using the following connection

'odbc-connection-name' => [ 'driver' => 'odbc', 'dsn' => 'Driver={SQL Server};Server=myserver;Database=db;', 'database' => env('DB_DATABASESQL', 'forge'), 'host' => env('DB_HOSTSQL', 'localhost'), 'username' => env('DB_USERNAMESQL', 'forge'), 'password' => env('DB_PASSWORDSQL', ''), ],

i get PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/app/current/vendor/abram/laravel-odbc/src/ODBCPdo.php on line 20

am i doing something incorrect or is it a bug?

andreossido commented 4 years ago

I never tested with UnixODBC, but the error says that not find any dsn. Did you install SQL Server driver in UnixODBC?