This example demonstrates the InternetTimeout property, which exists on the DataControl and DataSpace objects. This example uses the DataControl object and sets the timeout to 20 seconds.
'BeginInternetTimeoutVB Public Sub InternetTimeoutX() Dim dc As New DataControl Dim rst As ADODB.Recordset dc.Server = "http://yourServer" dc.ExecuteOptions = 1 dc.FetchOptions = 1 dc.Connect = "DSN=Pubs" dc.SQL = "SELECT * FROM Authors" dc.InternetTimeout = 20000 'Wait at least 20 seconds. dc.Refresh Set rst = dc.Recordset 'Use another Recordset as a convenience While Not rst.EOF Debug.Print rst!au_fname & " " & rst!au_lname rst.MoveNext Wend rst.Close End Sub 'EndInternetTimeoutVB
DataControl Object (RDS) | DataSpace Object (RDS) | InternetTimeout Property (RDS)