andreossido / laravel-odbc

ODBC integration for Laravel framework
35 stars 29 forks source link

Cursor type changed, SQL state 01S02 in SQLExecute #10

Open obrared2014 opened 4 years ago

obrared2014 commented 4 years ago

Hi. first thanks for this tool. I have this error and not if I am missing something in the configuration:

not work: 1.-$db->select("exec dbo.s_cob_login 'username','password' "); error: [ODBC Driver 17 for SQL Server]Cursor type changed, SQL state 01S02 in SQLExecute.

this if it works: (esto si funciona ) 1.- DB::connection('odbc')->table('tbl_usuario')->where('username', 'username')->get() 2.- $db->select(" select * from tbl_users where ...")

    'odbc' => [
        'driver' => 'odbc',
        'dsn' => 'testodbc1',
        'database' => env('DB_SCJ_DATABASE'),
        'host' => env('DB_SCJ_HOST'),
        'username' => 'xxxxx',
        'password' => 'xxxx'

gracias.

Enrica-r commented 3 years ago

Laravel supports MSSQL Server directly with database driver 'driver' => 'sqlsrv'. This ensures that query and schema grammar is correctly translated MSSSQL.