Hi every one
I want to generate a RSS Feed from SQL Server 2005.
The scenario is that when a record is entered in the database, the database fire a trigger which generate rss feed for the new record entered in the data base
Thanx in advance
Take care
Bye
I don't quite understand why you want to use trigger to generate the RSS. You can use SQL query to generate RSS like formatted data and show it to the end user. So every time the link on which you are showing the records gets refreshed, the sql query/procedure will get executed, and the RSS format XML data will be generated. All, you'll have to do is to through the result of the query/procedure as response.
For example, visit below link. It is actually a .aspx page where the coder has done exactly what I'm talking about.
http://www.codeproject.com/webservices/articlerss.aspx?cat=3
Hope this will help.
||| Would your best bet not be to write a page in ASP.net that generates the RSS by pulling the data from the SQL server whenever the page is called? This could then act as your trigger.
Thanx for ur response
|||
Hi
Thanx 4 ur response
I think i did not convey my message rightly.
I have to generate the xml file when the record is updated in the database using trigger. i don't want to query the database directly from the application.
Waiting 4 ur response
Take Care
Bye
|||Well, I'm still not convinced why you want to go the XML generation way. If you setup your RSS according to my previous post, you are at least worry whether new record is inserted or any record is updated.
Still, if you want to go for the trigger and xml generation way, then I think you'll have to dig down XML generation functions of SQL. Moreover, as you are also going to do IO operations in you SQL trigger, the path of the file and access permissions and so many other things should be taken care of. One way you can use is the CLR Integration. See if below link is useful:
http://www.sqldbatips.com/showarticle.asp?ID=23
No comments:
Post a Comment