Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Grab Stock Market Data
Message
From
13/03/2004 09:38:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00885913
Message ID:
00885932
Views:
14
>Tom,
>
>If I understand this code correctly, is this saving the info on MSFT in a file (using STRTOFILE) ? If so, I don't see it being saved anywhere - or perhaps I just missing something.
>
>Thanks,
>Mel Cummings
>
>
>loXmlHttp = NEWOBJECT( "Microsoft.XMLHTTP" )
>
>  lcURL = "http://finance.yahoo.com/d/quotes.csv"
>  loXmlHttp.open( "POST" , lcURL, .F. )
>  loXmlHttp.send( "s=MSFT,^DJI&f=sl1d1t1c1ohgv&e=.csv" )
>
>  IF loXmlHttp.STATUS != 200
>    lcMessage = TEXTMERGE( ;
>      "An error occurred - status = <<loXmlHttp.STATUS>><<loXmlHttp.statustext>>" )
>
>    MESSAGEBOX( lcMessage, 16, PROGRAM() )
>    EXIT
>  ENDIF
>
>  lcFile = SYS( 2015 )
>  STRTOFILE( loXmlHttp.responsetext, lcFile )
>
Mel,
I think you don't need to subscribe to access any issues (not sure). At least I could get to first issue - didn't try others :)

I changed last 2 lines to :

?loXmlHttp.responsetext

and saw the result on screen. It's saving to a sys(2015) generated filename. You might go that way but keep filename someway to later check/erase etc:

> lcFile = SYS( 2015 )
> STRTOFILE( loXmlHttp.responsetext, lcFile )
_cliptext = m.lcFile+'.' && Copy filename to clipboard

* Command window
modi file [Ctrl+V]
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform