以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  备份失败  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=193571)

--  作者:newsun2k
--  发布时间:2024/9/26 10:05:00
--  备份失败
我备份数据库,用下面的命令
use master;BACKUP DATABASE patentDB TO DISK = \'d:\\ftpfiles\\系统文件\\数据库备份\\20240926-sql11.bak\' With FORMAT
在sqlserver 2008里面执行,很顺利。
在系统里面,通过函数调用,命令窗口执行,执行sql都报错:查询超时已过期。
请大佬救我。


备份失败,System.Data.OleDb.OleDbException (0x80040E31): 查询超时已过期

   在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)

   在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery()

   在 Foxtable.SQLCommand.ExecuteNonQuery2()

   在 Foxtable.SQLCommand.ExecuteNonQuery()

   在 UserCode.A65LTOYqR91cqpgUz(Object[] Args)!

--  作者:有点蓝
--  发布时间:2024/9/26 10:25:00
--  
指定一下超时时间,改大一点

  • CommandTimeOut
    设置超时时限,默认为30秒,一般不需要设置此属性,除非需要进行非常耗时超过30秒的操作,以至于出现超时错误,此时可适当地加大CommandTimeOut属性的值。