Advertisement

04.07.2008 at 03:31PM PDT, ID: 23303025
[x]
Attachment Details

Read xml from a sql 2005 table

Asked by LegalZoomer in Microsoft Visual C#.Net, SQL Server 2005

Tags: Microsoft, SQL 2005, 2.0, C#.NET

I have a table with xml data type on one of the columns. Does anyone have code to read the xml from the table into an XmlDocument variable in C#.net

System.Xml.XmlDocument xmlNotification = new System.Xml.XmlDocument();
SqlConnection cnn = new SqlConnection("Data Source=XXXXx;Initial Catalog=MCC;Persist Security Info=True;User ID=user;Password=pass");
                    string cmdText = "select NotificationXML from _TaskNotificationXML where MCCTaskID = " + mccInspectionTaskNo;
                    SqlCommand cmd = new SqlCommand(cmdText, cnn);
                    cnn.Open();
                    xmlNotification = "fill in the blank";
                    cnn.Close();
                    cnn.Dispose();Start Free Trial
[+][-]04.07.2008 at 04:03PM PDT, ID: 21301270

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.07.2008 at 09:08PM PDT, ID: 21302533

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, SQL Server 2005
Tags: Microsoft, SQL 2005, 2.0, C#.NET
Sign Up Now!
Solution Provided By: FernandoSoto
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.21.2008 at 09:53AM PDT, ID: 21403720

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628