parsing a cvs stream from an http request

C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 
S

sollento

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
 
E

Edwin Knoppert

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top