Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increasing Timeouts with ADO

Status
Not open for further replies.

bplenge

Programmer
Oct 5, 2007
2
US
I have a program that I’m attempting to get counts using ADO. The code is below.


Global Const ConnString = "ODBC;UID=user;PWD=passwd;DSN=ORA"

Dim OraD As ADODB.Connection
Dim rsPreSample As ADODB.Recordset

Set OraD = CreateObject("ADODB.Connection")
OraD.CommandTimeout = 0
OraD.Open ConnString

sql = "select count (recip) from recipfile where recip >= ‘111111111’

Set rsPreSample = New ADODB.Recordset
rsPreSample.Open sql, ConnString


ADO has a default timeout of 30 seconds. I want to set it to 180 seconds, but the timeout keeps getting ignored. Can someone help me get a new timeout to execute?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top