Increasing Timeouts with ADO

BPlenge

Registered User.
Local time
Today, 10:21
Joined
May 14, 2007
Messages
10
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?
 

Users who are viewing this thread

Back
Top Bottom