0

I'm wondering if it is at all possible to take data from a website and update a table in SQL Server 2008 R2 at a given interval of time?

The website in question updates every 5 minutes, changing the values of two numbers. As stated above I'm using SQL Server 2008 R2 and I also have Visual Studio 2013 if that matters at all. I need to take these two numbers every 5 minutes and update a table I have created on the SQL Server.

I know I can use an Excel macro to do this, which I already have done, but my employer wants to bypass this altogether.

If this is possible, say via a VS application, then any helpful links or suggestions would be greatly appreciated.

Thanks in advance!

Scott Fiander
  • 158
  • 1
  • 17

1 Answers1

1

You can create an SSIS package with a "script task". This task could read the website and return the information. Then store it in your table.

To finish configure a job that call this SSIS package every 5 minutes.

Tom_Doe
  • 146
  • 3
  • Never thought of that, could you possibly provide any links that reference this exactly? If not that's cool, I can always google it haha. – Scott Fiander Mar 31 '14 at 13:13
  • 1
    Here is an example: http://stackoverflow.com/questions/16642196/get-html-code-from-a-website-c-sharp While you are reading the html code in the "StreamReader" find a regular expression like an html tag. You may use "Regex" class. Don't forget to check if the website propose a web service giving this information. – Tom_Doe Mar 31 '14 at 20:04
  • Turns out that configuring a job and creating an SSIS package won't do the trick. The time interval is too short to put this into use effectively, so I'm going to try to make a service.. somehow.. – Scott Fiander Apr 07 '14 at 14:28