AntonioZZZ
09-01-2008, 05:14 AM
hi everybody!
i'm using a xmlhttp object to connect to yahoo server and download historical stock data. everything works fine, but i want to add a connection timeout because sometimes it takes too much time due to the server traffic.
i'm using this function that i found
Private Function RCHGetURLData(pURL As String) As String
On Error GoTo ErrorExit
Dim oHTTP As New XMLHTTP
oHTTP.Open "GET", pURL, False
oHTTP.Send
If oHTTP.Status = "200" Then RCHGetURLData = oHTTP.responseText Else GoTo ErrorExit
Exit Function
ErrorExit:
RCHGetURLData = vError
End Function
i want to set a timeout...how can i do???
thanks everybody!
i'm using a xmlhttp object to connect to yahoo server and download historical stock data. everything works fine, but i want to add a connection timeout because sometimes it takes too much time due to the server traffic.
i'm using this function that i found
Private Function RCHGetURLData(pURL As String) As String
On Error GoTo ErrorExit
Dim oHTTP As New XMLHTTP
oHTTP.Open "GET", pURL, False
oHTTP.Send
If oHTTP.Status = "200" Then RCHGetURLData = oHTTP.responseText Else GoTo ErrorExit
Exit Function
ErrorExit:
RCHGetURLData = vError
End Function
i want to set a timeout...how can i do???
thanks everybody!