So I am using Laravel with a Microsoft Database and a MYSQL Database. The MYSQL connect just fine and displays results, but the Microsoft database returns a SQLSTATE[08001] error.
local.ERROR: SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746 (SQL: select top 1 * from [UserSummary] where [UserSummary].[UserID] = 233305
I can get the same statement to run fine in another project but in our current project it always gives us this error.
I tried downgrading Laravel to match the other project and that did not work.
Here is our config for sqlsrv
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('MICROSOFT_DB_HOST'),
'port' => env('MICROSOFT_DB_PORT'),
'database' => env('MICROSOFT_DB_DATABASE'),
'username' => env('MICROSOFT_DB_USERNAME'),
'password' => env('MICROSOFT_DB_PASSWORD'),
'charset' => 'utf8',
'prefix' => '',
],
I could be wrong but it seems like we are connecting its just that the statement is not running. With the same credentials I can connect to DataGrip and view the data in the DB.
I am unsure how to fix this error?