I was hoping someone could look at this code and let me know if we placed the .commandTimeout in the wrong place, or don't have it connected right.
I was told using .commandTimeout = 0 meant there was no timeout.. Yet we still get them.
Unfortunately the DB are huge as users want to keep everything FOREVER.. So we can streamline only so far.
______________________________________________
Public PublicCommSP As New ADODB.Command
Public rsPublicSP As New ADODB.Recordset
Public PublicConn as new ADODB.Connection
Public Function PublicSPFind(SPName As String) as integer
PublicCommSP.CommandType = adCmdStoredProc
PublicCommSP.CommandText = SPName
PublicConn.CursorLocation = adUseClient
'This help get rid of the command Timeout error. Setting to 0 means wait indefinately
PublicConn.CommandTimeout = 0
PublicCommSP.ActiveConnection = PublicConn
'Open SP Recordset
Set rsPublicSP = New ADODB.Recordset
rsPublicSP.CursorType = adOpenDynamic
rsPublicSP.LockType = adLockOptimistic
Set rsPublicSP.Source = PublicCommSP
rsPublicSP.Open
I was told using .commandTimeout = 0 meant there was no timeout.. Yet we still get them.
Unfortunately the DB are huge as users want to keep everything FOREVER.. So we can streamline only so far.
______________________________________________
Public PublicCommSP As New ADODB.Command
Public rsPublicSP As New ADODB.Recordset
Public PublicConn as new ADODB.Connection
Public Function PublicSPFind(SPName As String) as integer
PublicCommSP.CommandType = adCmdStoredProc
PublicCommSP.CommandText = SPName
PublicConn.CursorLocation = adUseClient
'This help get rid of the command Timeout error. Setting to 0 means wait indefinately
PublicConn.CommandTimeout = 0
PublicCommSP.ActiveConnection = PublicConn
'Open SP Recordset
Set rsPublicSP = New ADODB.Recordset
rsPublicSP.CursorType = adOpenDynamic
rsPublicSP.LockType = adLockOptimistic
Set rsPublicSP.Source = PublicCommSP
rsPublicSP.Open