Need help getting CSV data into recordset

Results 1 to 3 of 3

Thread: Need help getting CSV data into recordset

  1. #1
    Join Date
    Dec 1969

    Default Need help getting CSV data into recordset

    Hi, I&#039;m having a bit of a problem and I was hoping someone could help me out. I&#039;m trying to create an interface for manipulating historical stock prices obtained through I need to make a recordset contain the data of a CSV file that Yahoo returns, but the catch is that I want to pass the data along by pointing the recordset to the URL of the CSV files on the Yahoo server. Yahoo creates its CSV files dynamically through the querystring of its URL (see below), and I would use inputs to my interface to manipulate the URL for specific ticker symbols, dates, etc. I guess the simplest example is that a user could input a ticker to my interface, the recordset would somehow "call" the URL for the correct data, and then that data would be in the recordset, where I could manipulate it, before returning the information back to the user.<BR><BR>I&#039;m just stumped on how to get the CSV data into the recordset on the fly, just by calling the URL.<BR><BR>The following link is an example of what Yahoo does. Manipulating the querystring changes the ticker, date range, and level of detail. You can also change the table.csv to table.txt and return the actual data in one big text file.<BR><BR> 8&ignore=.txt<BR><BR>Any help would be greatly appreciated!<BR><BR>Thank you,<BR><BR>Mike

  2. #2
    Join Date
    Dec 1969

    Default Maybe with the ADODB.Stream object..

    .. but, even then I don&#039;t know if it&#039;ll "magically" know about the CSV data.<BR><BR>Your best bet is to probably create your own function that uses the MSXML2.ServerXMLHTTP object to make the HTTP request to Yahoo. Then, manually build the recordset yourself.

  3. #3
    Join Date
    Dec 1969

    Default Why not...

    ...use ServerXMLHTTP to grab the data, yes. But then stuff the data into a ".csv" file on the server and simply use the JET driver to open the .csv file as a database???<BR><BR>Despite the overhead of creating the file, I suspect that would be more efficient than having to manually create the recordset.<BR><BR>And if you cached the file(s) with meaninful name(s), then you could check to see if a file existed before running off to Yahoo again.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts