SAP Knowledge Base Article - Preview

2153477 - ADONET: 'Bad TDS response stream received from server. Unexpected token type received: 4' using sqldbgr sprocs - SDK for SAP ASE


  • The sqldbgr ASE utility is used to debug stored procedures and functions on ASE (Adaptive Server Enterprise).
  • Use of this functionality on the execution of a command causes ASE to send responses back in separate packets while the debugger on another spid is stepping through the procedure code.
  • At one point error is thrown:

Exception Stack: Sybase.Data.AseClient.AseException: Bad TDS response stream received from server. Unexpected token type received: 4.
at Sybase.Data.AseClient.AseDataReader.CheckResult(Int32 res)
at Sybase.Data.AseClient.AseDataReader.RetrieveNextResult()
at Sybase.Data.AseClient.AseDataReader.GetNextResult(Boolean isNeedProcessOutParams)
at Sybase.Data.AseClient.AseDataReader.NextResult()
at Sybase.Data.AseClient1.AseCommand.ExecuteNonQuery()
at Sybase.Data.AseClient.AseCommand.ExecuteNonQuery()



  • ASE ADO.NET Provider (occurs on lower versions)
  • ASE 15.7+ (I used 15.7 ESD#2)
  • Visual Studio 2012 using C#
  • .NET 4.0


SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0 ; SAP Adaptive Server Enterprise SDK 16.0 ; Sybase SDK 15.7 ; Sybase Software Developer Kit 15.7


ASE debug, #782454   , KBA , BC-SYB-SDK , SDK , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.