jcrodriguezt / laravel-sybase

Connection and Laravel Eloquent driver for Sybase
GNU General Public License v2.0
2 stars 1 forks source link

Problem with Connection #17

Open fikriichsan opened 5 months ago

fikriichsan commented 5 months ago

i use sql anywhere and odbc for connection database in windows to be precise. I try to follow your documentation but didnt work out. i already modify the rest with my driver host etc. but when i try to connect it won't connect. the error is Unsupported driver ['odbc']. based on your code driver sybase from your code is sybasease. is it because the driver is different or it doesnt matter. this is my database code and .env example 'sybase' => [ 'driver' => 'odbc', 'host' => env('DB_ODBC_HOST', 'sybase.myserver.com'), 'port' => env('DB_ODBC_PORT', '5000'), 'dsn' => env('DB_ODBC_CONNECTION_STRING'), // remove comment in case you define an odbc connection in your env 'database' => env('DB_ODBC_DATABASE', 'mydatabase'), 'username' => env('DB_ODBC_USERNAME', 'user'), 'password' => env('DB_ODBC_PASSWORD', 'password'), 'prefix' => '', ],

DB_ODBC_CONNECTION_STRING="odbc:DRIVER={SQL Anywhere 16};HOST=host;UID=user;PWD=password" DB_ODBC_PORT=2637 DB_ODBC_HOST=host DB_ODBC_DATABASE=database DB_ODBC_USERNAME=username DB_ODBC_PASSWORD=password

jcrodriguezt commented 5 months ago

Let me reproduce.. Last time I did odbc/windows it worked. I Just prefer linux connections but I understand there are needs...