Article ID: 195489
Article Last Modified on 7/6/2006
Dim cnn As New ADODB.Connection
Dim cnstring As String
cnstring = "Provider = SQLOLEDB;" & _
"DATA SOURCE =<server name>;" & _
"USER ID = <user id>;" & _
"PASSWORD =<password>;" & _
"INITIAL CATALOG = <database>;"
cnn.CommandTimeout = 0
cnn.Open cnstring
Dim cmd As New ADODB.Command
cmd.ActiveConnection = cnn
Debug.Print "Timeout on Connection: " & cnn.CommandTimeout
Debug.Print "Timeout on Command: " & cmd.CommandTimeout
Keywords: kbdatabase kbprb KB195489