View Full Version : Increasing Timeouts with ADO


BPlenge
10-24-2007, 01:11 PM
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?