Difficulty: Moderately Easy
Things You’ll Need:
Step1
Create an instance of "ADODB.Connection".
Step2
Set the ConnectionTimeout of the ADODB.Connection object to the amount of time you want to sleep in seconds.
Step3
Construct a connection string to a specific IP address rather than using a data source name (DSN). This should be pointing to a non-existant server and leave out the authentication information since it won't be necessary. I recommend pointing it locally (127.0.0.1) so you don't increase packet traffic on the network. Example string: "driver={sql server};server=127.0.0.1".
Step4
Call the Open() method with the connection string you made, but catch and ignore the exception thrown by it. If you're using VBScript you can use the horrific "ON ERROR RESUME NEXT", but remember to reset error handling afterwards.
Step5
You're done, that part of the code will cause configurable delay in your ASP.