Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure timing out

Status
Not open for further replies.

dellyjm

Programmer
Apr 13, 2000
168
JM
Every time I try the following statements I keep getting a command time out. How do I get around that?<br><br>Function StoredProc(gdate As String)<br><br>On Error GoTo ErrorHandler<br><br>Conn.BeginTrans<br><br>With Comm<br>&nbsp;&nbsp;.CommandText = &quot;sp_rmvnull_inv&quot;<br>&nbsp;&nbsp;.CommandType = adCmdStoredProc 'a constant<br>&nbsp;&nbsp;.CommandTimeout = 0<br>&nbsp;&nbsp;.ActiveConnection = Conn<br>&nbsp;&nbsp;.Parameters.Refresh<br>&nbsp;&nbsp;.Execute ' execute the stores procedure.<br>End With<br>With Comm<br>&nbsp;&nbsp;.CommandType = adCmdStoredProc 'a constant<br>&nbsp;&nbsp;.CommandText = &quot;sp_run_invoices&quot;<br>&nbsp;&nbsp;.CommandTimeout = 0<br>&nbsp;&nbsp;.ActiveConnection = Conn<br>&nbsp;&nbsp;.Parameters(&quot;@pub_date&quot;).Value = gdate<br>&nbsp;&nbsp;.Parameters(&quot;@pub_date&quot;).Direction = adParamInput<br>&nbsp;&nbsp;.Execute ' execute the stores procedure.<br>End With<br><br>Conn.CommitTrans<br><br>bDBConnectFail = False<br>Exit Function<br><br>ErrorHandler:<br><br>Conn.RollbackTrans<br>bDBConnectFail = True<br>MsgBox Err.Number & Err.Description, vbCritical<br><br>End Function<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top