sybase数据库连接出现异常

该方法是用来连接sybase数据库的,有时候执行该是可以的,但是有时候执行该方法就会出现异常:
Connection to Sybase server has been lost. All active transactions have been rolled back .

代码:
public DataTable ExecuteReader(string query, string connstr)
{

        using (AseConnection conn = new AseConnection(connstr))
        {
            using (AseDataAdapter adapter = new AseDataAdapter(query, conn))
            {
                adapter.SelectCommand.CommandTimeout = 60 * 3;

                DataTable dt = new DataTable();
                adapter.Fill(dt);
                Command.SQL("Success");
                return dt;
            }
        }
    }
查看全部
u010618015
u010618015
2013/07/22 02:38
  • sybase
  • 点赞
  • 收藏
  • 回答
    私信

1个回复