SAP Knowledge Base Article - Preview

2524732 - Stored procedure returns invalid results when executed via ADO.NET - SAP ASE


  • After ASE upgrade to 16.0, a stored procedure executed via an ADO. NET application returns a "NULL" value instead of a valid value.
  • The ADO.NET application does not receive an ASE error or catches an exception.
  • This stored procedure with the same input parameters executed via ISQL returns a valid result: 

1>  exec MyProcedure @parameter1=81230,@paramater2=1,@parameter3=81230,@parameter4=7122846
2> go

  • When this stored procedure with the same input parameters is executed from the ADO. NET application, it returns a "NULL" result value.
  • After the ADO.NET application executes this stored procedure and receives "NULL", the next execution of this stored procedure with the same parameters via ISQL also returns "NULL":

1>  exec MyProcedure @parameter1=81230,@paramater2=1,@parameter3=81230,@parameter4=7122846
2> go

  • The stored procedure works fine via ISQL again it is executed "with recompile".
  • The ADO.NET application returns a valid result with NamedParameters = false on the connection; 
    if the order of parameters in the exec statement matches the order of parameters in the stored procedure.
  • The same stored procedure returns valid results via the ADO.NET application and ISQL on ASE 15.0.3. 



  • SAP Adaptive Server Enterprise (ASE) 16.0:
    • SP02 PL06, SP02 PL06 HF1 & SP02 PL07
    • SP03 (GA / PL00), SP03 PL01 & SP03 PL02
  • .NET version 4.5


SAP Adaptive Server Enterprise 15.7


CR#805165, CR805165, 805165, CR808729, CR#808729, 808729, numeric, decimal, conversion, upscaling, SSQLCACHE_SPIN, parameterized, spinlock, contention, statement, cache, traceflag, 11011, dbcc, param, cache corruption , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , BC-SYB-SDK , SDK , Bug Filed

About this page

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

Search for additional results

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