2014-03-03 66 views
1

对于某些用户/大型事务,我看到超时错误。我不清楚它的含义:ADO连接超时

  1. 使用cnn.ConnectionTimeout vs cnn.CommandTimeout?
  2. 设置一个很长的超时周期
  3. 设置超时= 0(不确定?)

这里是一个片段(有多长太长?):

Set cnn = New ADODB.Connection 

'cnn.ConnectionTimeout = 30  
'cnn.CommandTimeout = 30 

cnn.CursorLocation = adUseClient 
cnn.ConnectionString = "driver={SQL Server}; server=" & myIP & ";Trusted_Connection=no;Database=" & myDatabase & ";UID= " & myUser & ";PWD= " & myPass & " 
cnn.Open 

strSQL = "uspDeleteAreaCommon @InvID = '" & myInvID & "';" 
Set rs = cnn.Execute(strSQL) 

任何建议/注意事项??

谢谢!

回答

0

没有人回复。

我用cnn.CommandTimeout = 0(无限超时?)

由于没有怨言,但我仍然不清除此设置的影响...