2014-03-03 110 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(無限超時?)

由於沒有怨言,但我仍然不清除此設置的影響...