ado connection time out

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
howl
Junior Coder
Posts: 24
Joined: Tue May 29, 2007 6:41 pm

ado connection time out

Post by howl » Tue Sep 16, 2008 2:09 pm

Using v9.1.03

I sometimes get a time out exception when opening an ado connection in the VB section of a script. I would like to either increase the connection time out or put in exception handling. Can you guide me or point me to to documentation on either option?

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Sep 16, 2008 2:29 pm

As you haven't provided any code I will have to guess that you are using ADODB.Connection. In which case you can set the timeout something like this:

Set conn = CreateObject("ADODB.Connection")
conn.ConnectionTimeout = 120
etc

Did you know version 10 includes native DB functions?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts