Public Function GetRecordset(ByVal strUser As String, ByVal strSql As String, Optional ByVal strCon As String) As ADODB.Recordset 
Dim objAdoRs As ADODB.Recordset 
Dim sngTmr As Single 
Dim strMsg As String On Error Resume Next Dim objContext As ObjectContext 
Set objContext = GetObjectContext() On Error GoTo Errhandler sngTmr = Timer Set objAdoRs = New ADODB.Recordset With objAdoRs 
.CursorLocation = adUseClient 
.CursorType = adOpenStatic 
.LockType = adLockReadOnly 
.Open strSql, IIf(UCase$(strCon) = "abc", CONN_abc, IIf(UCase$(strCon) = "a", CONN_a, CONN_A)) 
Set .ActiveConnection = Nothing 
End With Set GetRecordset = objAdoRs LogTransaction strUser, IIf(UCase$(strCon) = "abc", CONN_abc, IIf(UCase$(strCon) = "C", CONN_C, CONN_A)), strSql, "clsAmasDb.GetRecordset" If Not objContext Is Nothing Then 
objContext.SetComplete 
End If Exit Function Errhandler: If Not objContext Is Nothing Then 
objContext.SetAbort 
End If 
'Err.Raise Err.Number, Err.Source, Err.Description 
LogError Err.Description, strUser, IIf(UCase$(strCon) = "abc", CONN_S, IIf(UCase$(strCon) = "E", CONN_EQC, CONN_A)), strSql, "clsAmasDb.GetRecordset" End Function这个无何加入timeout? 谢谢先

解决方案 »

  1.   

    是如何加入timeout  :)
      

  2.   

    timeout是script,只能在脚本中调用。
    你可以把所有模块放到脚本中来使用。
      

  3.   

    ??
    谢谢你先
    不是有*.timeout = X  的设置么?
      

  4.   

    是有Object.timeout的属性,但那是设置超时的。比如:Session.timeout=300 就是设置Session变量的有效作用时间为300分钟,如果超过300分钟就超时了。如果你要用setTimeout实现计时器的功能的话,只能在<script>中使用.
    格式如下:setTimeout("Function",Time)Function为你要执行的函数,
    Time 为执行的时间间隔,单位为毫秒.