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.
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMschreef in
bericht news:uO**************@TK2MSFTNGP02.phx.gbl...
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!
*************************************************
"sollento" <ha*****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>Hello,
I am writing an asp.net application to retrieve a cvs file from an http
request and populate a dataset. Can someone provide sample code or a
reference example.
Step 1: http request to a web site (yahoo finance stock historical
quotes which returns a csv file -
http://ichart.finance.yahoo.com/tabl...02&ignore=.csv)
Step 2: parse the file and store in a dataset
Thank you in advance