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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLHTTP timeout

Status
Not open for further replies.

fischadler

Programmer
May 31, 2002
258
MT
I have an application that updates an online database that is located on a web server using the code below:

Public Function SendCommand(URLCommand) As String
Dim HttpReq As New MSXML2.XMLHTTP40
HttpReq.Open "GET", URLCommand, False
HttpReq.send
SendCommand = HttpReq.responseText
End Function

This connects to an ASP page that executes an SQL string passed as a query string.
Normally it works fine, but sometimes the internet slows down and then the operation hangs the pc for 15 minutes, sometimes. Is it possible to set a timeout so that the operation is cancelled if there is no connection within a few seconds?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top