Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
glennlawr
Starting Member
3 Posts |
Posted - 2011-01-11 : 06:39:53
|
Hello,I hope I am asking this in the correct place...I have a website that is database driven and was looking to see how I could auto update info in my database. Basically I want to be able to auto update the prices of some of my items when there is a market change in the live spot price of gold and silver.Can anyone tell me if they think this would be possible? I have looked at this from the website end of things but it doesn't seem to be possible. I was hoping it could then maybe be possible from the database end. I only know a little about SQL but was thinking maybe it would be possible by scheduling an sql script to run on a loop. Obviously then I would need to know how to get the required info into the script.My database sits on a Server 2005 Express server that is hosted by my webhost provider. However I can connect to and edit the database through Server Management Studio.Any help would be greatly appreciated... |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2011-01-11 : 06:55:49
|
Is there an API you are watching that will inform you of the price changes to gold or silver? If so, you could do this in c# or any language that will give you access to the API. Otherwise, unless you are sent the data or have another way of connecting to the data source, I can't see how you can get it either.. |
|
|
glennlawr
Starting Member
3 Posts |
Posted - 2011-01-11 : 07:37:27
|
No, I wasn't watching any API but may very well look at that option now! I was really looking to see if anyone could tell me any possible way of doing this.I don't actually know c# at all, but you say there are apps that can receive info from an API and then update the database?Thanks for your help Rick... |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-01-11 : 07:56:54
|
What is usually done is to have some sort of scheduled script that reads an xml-feed from another web site that publish this kind of information. This one for example (gold prices in metric grams in various currencies): http://dgcsc.org/goldprices.xmlIn order to schedule a server side (database) update with this information you will most likely need access to either Scheduled Tasks on the hosted server or SQL Server Agent.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
|
|
glennlawr
Starting Member
3 Posts |
Posted - 2011-01-11 : 11:03:01
|
That looks just like what I need Lumbago! Now I just need to look for a site that does silver and gold xml feeds. Then I suppose I just need to get a script that can take this info and put it into an sql script that is run on a schedule.Thanks for the help... |
|
|
|
|
|