SAP Knowledge Base Article - Preview

2273491 - ADO.NET: Running multiple SELECTs with COMPUTE raises Dictionary Exception - SDK for SAP ASE

Symptom

Multiple COMPUTE clauses in SELECT statements cause a Dictionary Exception:

Exception: System.ArgumentException: Item has already been added. Key in dictionary: '2'  Key being added: '2'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at Sybase.Data.AseClient.AseDataReader.ReadAltName()
   at Sybase.Data.AseClient.AseDataReader.Perform_RetrieveHasNextRow()
   at Sybase.Data.AseClient.AseDataReader.Perform_Skip_Next()
   at Sybase.Data.AseClient.AseDataReader.RetrieveNextResult()
   at Sybase.Data.AseClient.AseDataReader.GetNextResult(Boolean isNeedProcessOutParams)
   at Sybase.Data.AseClient.AseDataReader.NextResult()
   at Sybase.Data.AseClient.AseDataReader.CloseUrsHandle()
   at Sybase.Data.AseClient.AseDataReader.Close()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at SybaseDriverTest.Program.Main(String[] args) in \Program.cs:line 72


Read more...

Environment

  • SAP Sybase Software Developer Kit (SDK) 15.7
  • SAP Software Developers Kit (SDK) for Adaptive Server Enterprise (ASE) 16.0
  • SAP Adaptive Server Enterprise (ASE) 15.7 and 16.0
  • Adaptive Server Enterprise ADO.NET Data Provider
    • 3.5 Provider ( Sybase.AdoNet35.AseClient.dll )
    • 4.0 Provider ( Sybase.AdoNet4.AseClient.dll )
    • 4.5 Provider ( Sybase.AdoNet45.AseClient.dll )
  • Microsoft Windows x86
  • Microsoft Windows x64

Product

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

Keywords

Microsoft Windows, ADONET, .net, CR786821, CR#786821, 786821 , KBA , BC-SYB-SDK , SDK , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Known Error

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.