[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 634
  • Last Modified:

Increase timeout ms sql connection asp asp script

With this code in an asp script my connection times out how can I increase this timeout ?
c.Open cn
sql="update table set name='john' where id=123
c.Execute sql
set c = nothing

Open in new window

1 Solution
Daniel WilsonCommented:
is c an ADODB.Command?

The default timeout = 30 seconds.

c.CommandTimeout = 60 'set to 60 seconds
c.CommandTimeout = 0 ' Set to infinite

Either of those lines goes before line 3.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now