Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 791437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:50:10+00:00 2026-05-14T21:50:10+00:00

Database server is migrated from version 12.5x to version 15.03 Sybase.Data.AseClient version – 1.15.50.0

  • 0

Database server is migrated from version 12.5x to version 15.03
Sybase.Data.AseClient version – 1.15.50.0

I am getting below exception when I run few stored procedures through .Net app (using AseClient)

Internal Error :30016 Unknown Dataitem Dataitem

Stack Trace - 

   at Sybase.Data.AseClient.AseDataReader.CheckResult(Int32 res)
   at Sybase.Data.AseClient.AseDataReader.RetrieveNextResult()
   at Sybase.Data.AseClient.AseDataReader.GetNextResult()
   at Sybase.Data.AseClient.AseDataReader.NextResult()
   at Sybase.Data.AseClient.AseDataReader.CloseUrsHandle()
   at Sybase.Data.AseClient.AseDataReader.Close()
   at Sybase.Data.AseClient.AseDataReader.Dispose(Boolean disposing)
   at Sybase.Data.AseClient.AseDataReader.Dispose()
   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, String srcTable)
   at HSBC.STPMapper.SybaseDAL.Utilities.SybaseHelper.ExecuteDataset(CommandType commandType, String commandText, DataSet dataset, String table, AseParameter[] commandParameters) in C:\Utilities\SybaseHelper.cs:line 119

Note – Application was working fine before we migrated to new server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:50:10+00:00Added an answer on May 14, 2026 at 9:50 pm

    We were running into this issue with some code running under .NET Framework 3.5 and using Sybase.Data.AseClient.dll (version 1.1.510.0) when we upgraded our production server from 12.5 to 15. Everything worked well in the dev and test environments after upgrading, but failed in production, even though ASP classic code and PowerBuilder code was able to call the production Sybase server (big legacy system).

    If I tried calling the Read method of the AseDataReader for a single record, everything was fine. But if we allowed all the records to be read, it would read only 22 out of the 67 records that would be retrieved if you invoked the stored procedure via the Sybase SQL Advandage client. I boiled it down to a toy command line app to reproduce the issue. Here are the error details that would come out of the Read:

    Type: Sybase.Data.AseClient.AseException
    Message: Internal Error: 30016
    StackTrace:    at Sybase.Data.AseClient.AseDataReader.?(Int32 A_0)
       at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
       at Sybase.Data.AseClient.AseDataReader.?()
       at Sybase.Data.AseClient.AseDataReader.Read()
       at SybaseError.Program.TestCall(String friendlyName, String connectionString)
     in C:\Projects\SybaseUpgradeError\SybaseError\Program.cs:line 42
    

    Assuming that you declared your IDataReader / AseDataReader in a using block, you would actually get the following error when the reader went out of scope when the original error from the Read was thrown:

    Type: Sybase.Data.AseClient.AseException
    Message: Internal Error: 30016
    StackTrace:    at Sybase.Data.AseClient.AseDataReader.?(Int32 A_0)
       at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
       at Sybase.Data.AseClient.AseDataReader.?()
       at Sybase.Data.AseClient.AseDataReader.?()
       at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
       at Sybase.Data.AseClient.AseDataReader.NextResult()
       at Sybase.Data.AseClient.AseDataReader.?()
       at Sybase.Data.AseClient.AseDataReader.Close()
       at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
       at Sybase.Data.AseClient.AseDataReader.Dispose()
       at SybaseError.Program.TestCall(String friendlyName, String connectionString)
     in C:\Projects\SybaseUpgradeError\SybaseError\Program.cs:line 54
    

    You’ll notice that the Dispose method of the AseDataReader is throwing an exception, which is a big no-no. Even worse is that if you catch the exception as an AseException and iterate over the Errors collection property, reading those will throw exceptions. Apparently, checking the properties of an AseError object actually invokes some dynamic code in the property that tries to look things up from an active connection. I’m not particularly impressed by this version of the Sybase .NET client code.

    The issue boiled down to a packet size setting that was different on the production server than on the dev and test servers. I don’t have admin access, but I believe they were set to min 2048 and max 4096 on the dev and test servers but both min and max set to 4096 on the production server. That’s based on my recollection of a conference call, so your mileage may vary. I just wanted to put it out here in case it helps somebody else later. It took us a while to track the problem down. Changing the minimum packet size and rebooting the production database server did fix the problem for us.

    In case it helps, here’s my test console app with the connection strings scrubbed. Again, the commented lines at the bottom would throw errors if uncommented. Hope this helps you!

    using System;
    using System.Data;
    using Sybase.Data.AseClient;
    
    namespace SybaseError
    {
        public class Program
        {
            public static void Main(string[] args)
            {
                const string DevelopmentConnection = "Data Source='**********';Port='****';UID='**********';PWD='**********';Database='**********';";
                const string ReportConnection = "more secret stuff";
                const string ProductionConnection = "yet more secret stuff";
    
                TestCall("Development", DevelopmentConnection);
                TestCall("Report", ReportConnection);
                TestCall("Production", ProductionConnection);
    
                Console.ReadKey();
            }
    
            private static void TestCall(string friendlyName, string connectionString)
            {
                Console.WriteLine("Calling procedure on " + friendlyName + ".");
    
                int recordsRead = 0;
    
                try
                {
                    using (var connection = new AseConnection(connectionString))
                    {
                        connection.Open();
    
                        using (var command = connection.CreateCommand())
                        {
                            ConfigureCommand(command);
    
                            using (var reader = command.ExecuteReader(CommandBehavior.CloseConnection))
                            {
                                try
                                {
                                    while (reader.Read())
                                    {
                                        // Would usually read things here...
                                        recordsRead++;
                                    }
                                }
                                catch (Exception exRead)
                                {
                                    Console.WriteLine("Error on read:");
                                    ShowError(exRead);
                                    throw;
                                }
                            }
                        }
                    }
    
                    Console.WriteLine("Success calling procedure on " + friendlyName + ".");
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Outer error:");
                    ShowError(ex);
                    Console.WriteLine("Failure calling procedure on " + friendlyName + ".");
                }
    
                Console.WriteLine("Finished calling procedure on " + friendlyName + ".  Read " + recordsRead + " records.");
                Console.WriteLine(string.Empty);
            }
    
            private static void ConfigureCommand(AseCommand command)
            {
                command.CommandText = "sp_s_educator_route_tests";
                command.CommandType = CommandType.StoredProcedure;
    
                var spidParameter = new AseParameter("@spid", AseDbType.Integer);
                spidParameter.Value = 1355945;
                command.Parameters.Add(spidParameter);
    
                var vendorIdParameter = new AseParameter("@vendor_id", AseDbType.Integer);
                vendorIdParameter.Value = 1;
                command.Parameters.Add(vendorIdParameter);
            }
    
            private static void ShowError(Exception ex)
            {
                Console.WriteLine("Type: " + ex.GetType());
                Console.WriteLine("Message: " + ex.Message);
                Console.WriteLine("StackTrace: " + ex.StackTrace);
    
                var exAse = ex as AseException;
    
                if (exAse != null)
                {
                    //foreach (AseError error in exAse.Errors)
                    //{
                    //    Console.WriteLine("SqlState: " + error.SqlState);
                    //    Console.WriteLine("State: " + error.State);
                    //}
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 396k
  • Answers 396k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The following two examples should both work in theory: var… May 15, 2026 at 3:07 am
  • Editorial Team
    Editorial Team added an answer An UPDATE operation does not return a resultset. Therefore, if… May 15, 2026 at 3:07 am
  • Editorial Team
    Editorial Team added an answer I believe you are doing this in Silverlight, because binding… May 15, 2026 at 3:07 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.