φ(..) ビボ~6 φ(..)

主にAccess、VBAに関する備忘録

Access2000 Adp のCommandTimeout

CurrentProject.Connection.CommandTimeOut で設定してもダメなようです。

    Dim ADOCmd As ADODB.Command
    Set ADOCmd = New ADODB.Command
    
    With ADOCmd
         .CommandText = "xxx"

        .ActiveConnection = CurrentProject.Connection
        .CommandTimeout = 0
        .Execute
    End With
    
    Set ADOCmd = Nothing

ConnectionオブジェクトでExecuteせず、Commandオブジェクトで。