Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Adding root node to SQL

Adding root node to SQL

Scheduled Pinned Locked Moved Database
databasexmlhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amit Kumar G
    wrote on last edited by
    #1

    I have a sql where i need to add root node... Current SQL SELECT CategoryId,CategoryDesc FROM TB_CategoryMaster AS Category WHERE CategoryActive=0 ORDER BY CategoryDisplayOrder FOR XML AUTO, ELEMENTS, TYPE output : 1001Automobiles But i want 1001Automobiles any help?

    P 1 Reply Last reply
    0
    • A Amit Kumar G

      I have a sql where i need to add root node... Current SQL SELECT CategoryId,CategoryDesc FROM TB_CategoryMaster AS Category WHERE CategoryActive=0 ORDER BY CategoryDisplayOrder FOR XML AUTO, ELEMENTS, TYPE output : 1001Automobiles But i want 1001Automobiles any help?

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Are you using the SQLXML Managed Classes to fetch your data? If so, set the RootTag property of your SqlXmlCommand object to "root" before executing the query. Paul

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups