Question

sometimes I got the below error when trying to open connection to sybase using ase client

Connection to Sybase server has been lost. 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)

I am using 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

search does not lead to something useful, what I get is this link, but with no help

Was it helpful?

Solution

couldn't find any solution for this defect or the root cause of this, so i developed just catched this exception and then retried the connection and command execution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top