I have a database in Sybase (Adaptive Server Enterprise) and we started using the Laravel framework to transfer systems that already exist, for him (a migration in the DB can not be considered).
Laravel by default can not connect to the ODBC protocol, let alone to Sybase. It is possible through FreeTDS to use SQLServer's DBLib for this task, but it works only on Linux and I need this to be possible in both Windows and Linux.
Knowing that Laravel uses the PDO function, I have implemented, from the SQLServer code, classes to be able to connect to Sybase (from the ODBC protocol and the Adaptive Server Enterprise driver).
I can do absolutely everything with Sybase from PDO with pure php, but in Laravel, only SELECT works, giving the same error at least in UPDATE and INSERT. I'm using the same settings in both cases, and it gives the following errors:
Error 1/2:
PDOException in Connection.php line 358: SQLSTATE[ZZZZZ]: <<Unknown error>>: 3811 [Sybase][ODBC Driver][Adaptive Server Enterprise]Um datastream incorreto foi enviado ao servidor. O servidor esperava o token 1 porém recebeu o token 0. Isto é um erro interno. (SQLExecute[3811] at ext\pdo_odbc\odbc_stmt.c:254)
Error 2/2
QueryException in Connection.php line 621: SQLSTATE[ZZZZZ]: <<Unknown error>>: 3811 [Sybase][ODBC Driver][Adaptive Server Enterprise]Um datastream incorreto foi enviado ao servidor. O servidor esperava o token 1 porém recebeu o token 0. Isto é um erro interno. (SQLExecute[3811] at ext\pdo_odbc\odbc_stmt.c:254) (SQL: insert into [produtos] ([nome], [descr]) values (teste, teste))
The detail is that in Linux with DBLib, it works with the same settings for the Grammar and PostProcessor.