如何设置SQLServer的超时时间?

如何设置SQLServer的超时时间?,第1张

如何设置SQLServer的超时时间

SqlCommand sqlcommand = connection.CreateCommand()

sqlcommand.CommandTimeout = 60

//默认时间为 30 秒

您好:

正常我们通过DateTime格式储存。

通过

SELECT CONVERT(NVARCHAR(15),时间字段,23)

来获取需要的格式。

或者直接保存成Date类型。

进入查询分析器,选择数据库,执行:

EXEC sp_configure 'allow updates', 1 RECONFIGURE WITH OVERRIDE

然后执行:

update sysobjects set crdate='2010-5-20 14:30' where name = '表名' and xtype = 'u'

最后执行:

EXEC sp_configure 'allow updates', 0 RECONFIGURE WITH OVERRIDE

OK,我用过没问题,不过轻易不要改别的东西,免得数据库蹦了。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/tougao/11302246.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-15
下一篇2023-05-15

发表评论

登录后才能评论

评论列表(0条)

    保存