SQLSTATE[HY000] General SQL Server error: Check messages from the SQL Server (Severity 14) (SQL: select * from [product])

Asked

Viewed 447 times

0

I have an application in Laravel connecting in the database in an SQL Server when I will make a query of all products I am getting the error

SQLSTATE[HY000] General SQL Server error: Check messages from the SQL Server (severity 14) (SQL: select * from [produto])

database php.

'sqlsrv' => [
    'driver' => 'sqlsrv',
    'host' => env('DB_HOST', 'xxx.xxx.xxx.xxx'),
    'port' => env('DB_PORT', '1433'),
    'database' => env('DB_DATABASE', 'MpiWeb'),
    'username' => env('DB_USERNAME', 'xxxxxx'),
    'password' => env('DB_PASSWORD', 'xxxxxx'),
    'charset' => 'utf8',
    'prefix' => '',
],

Woocontroller.php

public function mpiweb(){ 
$listaprodutos = Everest::all();
    return $listaprodutos;
}
  • @Marcelorafael I believe that the query is the one that is in the question: select * from [produto]

  • Do your credentials work properly if you use outside of the application? Why I saw Severity 14 is caused by login problems.

  • 1

    This might help https://stackoverflow.com/a/40440063/3956218

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.