parsing a cvs stream from an http request

  • Thread starter Thread starter sollento
  • Start date Start date
1. Request page
2. Put into a store (this can be as simple as saving to your drive or you
can choose a memory stream to hold in memory)
3. Read from the store (use a stream object; memory stream for in memory
storage, streamreader for file system -- the second is a bit easier)
4. Use ADO.NET to read the file (Jet provider) into the DataSet
5. (optional) If you saved the file downloaded, delete it

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
Thank you. I would be grateful if you could let me know which functions
to use for 1 to 3. I know how to do 4.

Thank you in advance
 
To download a file you can use
My.Computer.Network.DownloadFile(...)
but only VB code can be used, not supported in c#, so a simple compiled
assembly to be used in your c# app should do.
This is the easiest however, it does not harm to dive into the webrequest()
stuff, at some point you'll need to contact and post data to other
webservers is my assumption (as i have)


Once the csv is downloaded (tempfile or so) you can open it via ado.net, see
www.connectionstrings.com for hints on the extra params.
 
Back
Top