Greetings, Everyone...
I'm new to Visual Foxpro, still learning the ropes, please help me out.
The environment is VFP 9 SP 2 on Win7.
I need to read a web-browser based log, and insert it into a database.
I was able to open the webpage from VFP, and read it (so far so good )
by this code:
(I've found it here, guys... most of my VFP knowledge comes from this place )
My trouble is the following:
If I open this web based log reader in a browser, it dumps the arriving messages continously.
When I try to read it through XMLHTTP, it waits up until 3000 messages arrive together and only dumps it then. If I read earlier logs, they arrive in reasonable time. If I'd read realtime log, it waits 3000 messages together, which is unacceptable with realtime watching.
Until all 3000 messages arrive, loreq.readystate property stuck in 3 (interactive) and loreq.responsetext is empty.
Is there a way to break or pause or put on hold the reading? I thought I should read the log in every 5-10 seconds or in every 50-100 pieces in a cycle and process it.
When I use the Abort method, it breaks the reading, but throws away everything and responsetext property stays empty.
How could I read this log piece by piece as I need it?
I'm new to Visual Foxpro, still learning the ropes, please help me out.
The environment is VFP 9 SP 2 on Win7.
I need to read a web-browser based log, and insert it into a database.
I was able to open the webpage from VFP, and read it (so far so good )
by this code:
(I've found it here, guys... most of my VFP knowledge comes from this place )
Code:
lcReqstr="http..." && (the opening url comes here. I wouldn't bother you with it, it's more than 500 bytes long with the parameters)
lcRespstr=""
loreq=CREATEOBJECT("MSXML2.XMLHTTP.6.0")
loreq.open("GET",lcReqstr,.t.)
loreq.send()
DO WHILE loreq.readystate<>4
DOEVENTS
ENDDO
lcRespstr=loreq.responsetext
* ...processing responsetext
My trouble is the following:
If I open this web based log reader in a browser, it dumps the arriving messages continously.
When I try to read it through XMLHTTP, it waits up until 3000 messages arrive together and only dumps it then. If I read earlier logs, they arrive in reasonable time. If I'd read realtime log, it waits 3000 messages together, which is unacceptable with realtime watching.
Until all 3000 messages arrive, loreq.readystate property stuck in 3 (interactive) and loreq.responsetext is empty.
Is there a way to break or pause or put on hold the reading? I thought I should read the log in every 5-10 seconds or in every 50-100 pieces in a cycle and process it.
When I use the Abort method, it breaks the reading, but throws away everything and responsetext property stays empty.
How could I read this log piece by piece as I need it?