title: SQL Server return Select statement with XML datatype and convert it into DataSet in C#, ASP.Net
body: <p>In my database table, I have a column name 'SectionDatatable' which are in XML datatype. In my C# code, after I have connection to database to my database and I make a query to get SectionDatatablewhich is XML format in my database, UserDefinedSectionData. I need to convert the 'SectionDatatable' in XML Datatype and convert it into DataSet, how can I do it. I have stuck for 1 day, the following is my code.</p>
  
  <pre><code>        SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder();
          csb.DataSource = @"CPX-XSYPQKSA91D\SQLEXPRESS";
          csb.InitialCatalog = "DNN_Database";
          csb.IntegratedSecurity = true;
  
          string connString = csb.ToString();
  
          string queryString = "select * FROM UserDefinedSectionData WHERE SectionDataTabId = @tabId";
  
          using (SqlConnection connection = new SqlConnection(connString))
          using (SqlCommand command = connection.CreateCommand())
          {
              command.CommandText = queryString;
              command.Parameters.Add(new SqlParameter("tabId", tabId));
              connection.Open();
  
              using (SqlDataReader reader = command.ExecuteReader())
              {
                  while (reader.Read())
                  {
                      string sectionData= reader["SectionDatatable"].ToString();
                      int moduleId = Int32.Parse(reader["SectionDataModuleId"].ToString());
                  }
              }
          }
  </code></pre>