Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Copy data to SQl Table

Copy data to SQl Table

Scheduled Pinned Locked Moved IT & Infrastructure
databasecomquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kibromg
    wrote on last edited by
    #1

    Hi All, I am trying to read data from a certain URl .Every time you run the Url with Different param it gives a result like the following. For instance runinng http://data.com/data.aspx?datefrom=20090601&dateto=20090621 will give a result of a comman separated data like the following. "john","wood","20090203" "terry",'brown",20090209" etc.. How will i read that and get it in to Sql Table?All i have to run is the above URL to generate the value. Please advice. Thank you in advance

    L 1 Reply Last reply
    0
    • K kibromg

      Hi All, I am trying to read data from a certain URl .Every time you run the Url with Different param it gives a result like the following. For instance runinng http://data.com/data.aspx?datefrom=20090601&dateto=20090621 will give a result of a comman separated data like the following. "john","wood","20090203" "terry",'brown",20090209" etc.. How will i read that and get it in to Sql Table?All i have to run is the above URL to generate the value. Please advice. Thank you in advance

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Call this URL using WebRequest class methods. You will get the string output from url. Sample code to call URL

      string strUrl = "http://www.abc.com/a.aspx";
      Uri url = new Uri(strUrl);
      string strFinal = url.ToString();
      WebRequest objWebReq = WebRequest.Create(strFinal);
      WebResponse objWebRes = objWebReq.GetResponse();
      Stream objStream = objWebRes.GetResponseStream();
      StreamReader objStreamReader = new StreamReader(objStream);
      string strHTML = objStreamReader.ReadToEnd();

      Now write a logic over a string to save data into SQL

      Regards Aman Bhullar www.arlivesupport.com[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups