質問

データベースサーバに移行するバージョン12.5xバージョン15.03 Sybase.データです。AseClientバージョン-1.15.50.0

どんどん下の例外をかける少数の格納手続きます。Netアプリを使用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

注申請した細かい作業をする前に移住した新しいサーバーです。

役に立ちましたか?

解決

またこの問題がコード走行。NET Framework3.5を使用 Sybase.Data.AseClient.dll (バージョン1.1.510.0時に更新しました当社の生産からサーバー12.5 15.全ての機器および試験環境のバージョンアップ後も失敗した生産ものの、ASP classicコードPowerBuilderコードで、生産Sybaseサーバー(レガシーシステム)

また呼び出し 読む の方法 AseDataReader のためのシングル記録にあります。その許可は、すべてのデータを読み込み、読み取りのみ22日に67の記録が取得する場合は呼び出され、保存の手順をSybase SQL Advandageます。た煮で玩具コマンドラインのアプリを再現します。このエラー内容がもたくさん出てくると思うの 読む:

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

したと仮定すると、あなたは宣言されてお IDataReader / AseDataReader a を使用 ブロックという、実際には、以下の場合にはエラーのリーダーの範囲によりエラーからの 読む がスローされるまで:

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

すること 処分 の方法 AseDataReader は例外をスローである大す。でも悪くなる場合は例外をキャッチし、この例外として AseException とに対して繰り返し処理を実行し 誤差 コレクション、読む者をスローします。どうやら、チェックの特性 AseError オブジェクトを実際にソッドを呼び出し一部の動的コードの物件を見ようといとの思いから活発に接続します。してしまった感動このバージョンの開発.純クライアントコード.

の問題で煮詰め、パケットサイズを設定した別のサーバ以外の機器や試験します。思っていた管理者のアクセスがあると思っていった設定を分2048、最大4096の機器および試験サーバーが最小値と最大値に設定4096のサーバーです。これに基づく私の記憶の電話会議なので燃費は変更になる場合がございます。そう思ってやってきましたかち合いようです。からの問題です。変化の最小パケットサイズを再起動産データベースサーバかった不具合の修正をしました。

場合で、こちらの試験のコンソールアプリの接続文字列を防ぐ.再び、とにもスローエラー uncommented.武器agiは、dexで下がらないboxerぐ!

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);
                //}
            }
        }
    }
}

他のヒント

<のhref = "http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-858&group=sybase.public.connectivity.adonet" のrel = "nofollowをnoreferrer" を見てみましょう>このを。あなたはSybaseは今の詳細うるさいであることを、あなたのデータに問題を持っているように見えます。

をチェックしたいかもしれないものがいくつかあります。 NULLではありませんsmalldatetime型で作業する場合まず、あなたはこのエラーを取得します。そうならば、あなたはそれがNULLABLEこと、それは問題を修正するかどうかを確認するために変更することができます。 4096にそれを設定するための8192試みであれば第二に、ODBC DSNのパケットサイズを見てみます。

私はそれが役に立てば幸います。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top