This is the “Simple” Way to Build RSS? Yikes!

Alan Levine aka CogDog barked this January 30th, 2004 7:49 pm


Wow, this is simple:

                        SqlConnection objConnection = new SqlConnection(ConfigurationSettings.AppSettings["MyConnectionString"]);
                        objConnection.Open();
                        string sql = "SELECT TOP 10 Title, Summary, ArticleID, PostTime FROM Articles ORDER BY PostTime DESC";
                        SqlCommand objCommand = new SqlCommand(sql, objConnection);
                        SqlDataReader objReader = objCommand.ExecuteReader();
                        while (objReader.Read())
                        {
                                objX.WriteStartElement("item");

I would hate to see the hard way ;-) I realize this is an ASP coders page, but perhaps we need some international standards on defining simple!

Comments are closed.


Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License
and may be patrolled by a friendly small dog (with a wagging tail)
This means you are free to use any original content published here (begs the question why)
as long as you provide linktribution.

.