Sometimes a connection to a database cannot occur because of delays from network traffic or heavy server use. In that case, an error message is produced and the connection process is stopped. Increasing the connection timeout value will give the server longer to create the connection before returning a message.
Also, when a complicated query is executed against numerous records, the server may not be able to bring back results before the threshold timeout value is reached. Increasing the command timeout value will give the server longer to execute the query before returning an error message.
To set the timeout value, do the following:
Note The Connection field, which sets the connection timeout property of the connection object, is set to a default of 15 seconds. The Command field, which sets the command timeout property of the command object, is set to a default of 30 seconds.