简体   繁体   English

ADO.net sybase ASEConnection错误

[英]ADO.net sybase ASEConnection error

sometimes I got the below error when trying to open connection to sybase using ase client 有时尝试使用ase客户端打开与sybase的连接时出现以下错误

Connection to Sybase server has been lost. 与Sybase服务器的连接已丢失。 All active transactions have been rolled back Stack Trace : at Sybase.Data.AseClient1.AseCommand.CheckResult(Int32 res) at Sybase.Data.AseClient1.AseCommand._ExecuteReader(CommandBehavior commandBehavior) at Sybase.Data.AseClient.AseCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) 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) 所有活动事务均已回滚堆栈跟踪:位于Sybase.Data.AseClient.AseCommand.ExecuteDbDataReader(CommandBehavior)处的Sybase.Data.AseClient1.AseCommand._ExecuteReader(CommandBehavior commandBehavior)处的Sybase.Data.AseClient1.AseCommand.CheckResult(Int32 res)行为)在System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior行为)在System.Data.Common.DbDataAdapter.FillInternal(DataSet数据集,DataTable []数据表,Int32 startRecord,Int32 maxRecords,字符串srcTable, System.Data.Common.DbDataAdapter.Fill上的IDbCommand命令,CommandBehavior行为)(System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)上的DataSet dataSet,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令,CommandBehavior行为)

I am using dll Sybase.AdoNet2.AseClient (64 bit) version 2.155.1015.0 我正在使用dll Sybase.AdoNet2.AseClient (64 bit) version 2.155.1015.0

my code is as follows 我的代码如下

AseConnection Connection = new AseConnection("ConnectionString");
AseCommand Command = new AseCommand("StoredProcedure", Connection);
Command.CommandType = CommandType.StoredProcedure;
AseDataAdapter adapter = new AseDataAdapter();
DataSet ds = new DataSet();
adapter.SelectCommand = Command;
adapter.MissingSchemaAction = SchemaAction;
adapter.Fill(ds);

this code run under IIS web service 此代码在IIS Web服务下运行

search does not lead to something useful, what I get is this link , but with no help 搜索不会导致有用的东西,我得到的是this link ,但没有帮助

找不到针对此缺陷或根本原因的任何解决方案,因此我开发的方法只是捕获了此异常,然后重试了连接和命令执行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM