reduce timeout when database unavailable

  • Hi,

    I have some ASP (Classic) code that queries a SQL 2005 Express database. I'm currently handling programmatically if this DB goes down by handling the error when someone tries to connect and can't.

    I capture the error and bypass subsequent db queries to this database using a session variable. My problem is that this first query takes about 20 seconds before it timeouts.

    I'd like to reduce this timeout length but can't find which property either in the code or database is the right one to reduce.

    Any suggestions please?

    Thanks,

    Andy

  • It's ConnectionTimeout, in the connection object.

    See this page for reference:

    http://www.devguru.com/technologies/ado/8534.asp

    -- Gianluca Sartori

  • thanks, but that doesn't seem to affect the length of timeout period. Still 20s even if I set as low as 5s

    e.g. ConnectionTimeout = 5

    any other suggestions?

  • Are you using a command object or opening the recordset with connection.execute?

    If you are using a command object, check the connection timeout property there.

    -- Gianluca Sartori

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply