-
XMLHTTP connection timeout
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
[VBA]
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
[/VBA]
i want to set a timeout...how can i do???
thanks everybody!
-
-
are you sure?
i don't know...
actually i don't use any istance of ie, i just use the xml library...and i don't know if it comes with ie....
can i do something?
-
I'm at a loss. I thought there might be a default property for that in IE but I couldn't find one. I'm not familiar with the XMLHTTP object. I just noticed two asterisks denoting two of its properties and when I checked them both, they were for IE8-Beta. The TimeOut property was one of them.
-
hi everybody,
i wanna ask one more thing
can i use a timer to use like a timeout, could it work? how can i do?
i was thinking about something like
[vba]
dim start as double
start = Timer
while Timer - start < 10 'for example
...
wend
[/vba]
i would put the code instead of dots...but it doesn't work...
thanks,
i really need this connection timeout!
Last edited by AntonioZZZ; 09-10-2008 at 02:33 PM.
-
-
thanks!!!
i'll try it as soon as i'll be at home...
i'll let you know
thanks again!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules