SqlDataReader DataRead = frmMain.m_AccessDB.DownLoadFiles(RootInfo.iID, sYear.strName);
while (DataRead.Read())
{
.....
if (backgroundWorker1.CancellationPending == true)
{
DataRead.Close()
return false;
}
}由于DataRead中数据量较大,我Close()的时候总是超时,(测试的时候,connection都是正常的)请问如何解决,谢谢。
while (DataRead.Read())
{
.....
if (backgroundWorker1.CancellationPending == true)
{
DataRead.Close()
return false;
}
}由于DataRead中数据量较大,我Close()的时候总是超时,(测试的时候,connection都是正常的)请问如何解决,谢谢。
解决方案 »
- 如何让WebBrowser只能显示,不可编辑
- 有关ProcessStartInfo的一个小问题
- 关于异步的问题
- 在我的程序中如何实现一个数据缓存,别的程序可以写进来,我要在程序中维护这个数据并整理后写入数据库。数据量非常大
- listBox1.ItemHeight属性问题
- c# 中使用DHTML问题,奇怪
- 专科不爽啊,想专升本!
- ParameterDirection.InputOutput 单独in或者out明白,为什么in和out组合? [Serializable]是可以指定任意的类?
- 各位大侠请救命!!!谢谢!
- Microsoft Visual C# 是如何调用 MessgaeBox()???????
- xml文件作为水晶报表的数据源
- .NET网站中代码实现数据库自动备份
{
.....
}DataRead.Close()
一般都是把close()放到循环外,不知是否与这有关。。
{
....
}
这样不一样吗?
楼上正解,应该给分!!//
// 摘要:
// Gets or sets the wait time before terminating the attempt to execute a command
// and generating an error.
//
// 返回结果:
// The time in seconds to wait for the command to execute. The default is 30
// seconds.
[ResDescription("DbCommand_CommandTimeout")]
[ResCategory("DataCategory_Data")]
public override int CommandTimeout { get; set; }
默认是30秒 自己设一下吧