Timeout expired

P

Phil Hellmuth

I'm attempting to run the following code. A sproc is called (a lengthy
one), and after approx. 1 minute I get a 'timeout expired' error message,
even though I've tried various values for the connection's ConnectionTimeout
parameter. Any suggestions?
Dim adoConnection As ADODB.Connection

Const sDataSource As String = "MediaStaging"

Const sUsername As String = "sa"

Const sPassword As String = "ABC"

Set adoConnection = New ADODB.Connection

adoConnection.ConnectionTimeout = 0

adoConnection.Open "DSN=" & sDataSource, sUsername, sPassword

Dim adoCommand As New ADODB.Command

adoCommand.ActiveConnection = adoConnection

adoCommand.CommandText = "LongSproc"

adoCommand.CommandType = adCmdStoredProc

adoCommand.Execute
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top