fischadler
Programmer
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
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