sybase errors - meaning and resolution
TDS: unexpected token


TDS (transaction Data Stream) is the application layer protocol of Sybase &amp; MS SQL for communication between OpenClient &amp; OpenServer 
The sample messages in the post point to TDS exchange between ASE &amp; DB-LIB client not being in sync according to the TDS protocol
The network exchange machine state in the affected TDS connection at the ASE OpenServer end is not expecting a request from the DB-LIB client for any resultset
The above situation may happen if an existing DB-LIB client is picking up a new TDS connection instead of the original one to continue with getting the resultset from a query submitted earlier
A typical scenario would involve a pool of connections from a Sybase client to the ASE, should an existing client incorrectly switches to another connection in the pool after submitting a query, the OpenServer of the new, incorrect connection would not understand the client's TDS token requesting resultset
Another possible root-cause could be network issue because 56 is not a valid TDS token (0x38 is not a valid token nor 0x56) 
BTW, DB-LIB is an arcane, unsupported Sybase client (newer, supported Sybase client is CT-LIB)