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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to convert XML Datatype in SQL to C#

How to convert XML Datatype in SQL to C#

Scheduled Pinned Locked Moved C#
csharpdatabasexmltutorialquestion
5 Posts 3 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.
  • S Offline
    S Offline
    srivatsan24
    wrote on last edited by
    #1

    Hi, How will i convert a XML datatype in SQL to a C# datatype. Can we use XMLDocument datatype in C#? If yes how can it be used? Thanks in advance Srivatsan

    O 1 Reply Last reply
    0
    • S srivatsan24

      Hi, How will i convert a XML datatype in SQL to a C# datatype. Can we use XMLDocument datatype in C#? If yes how can it be used? Thanks in advance Srivatsan

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      If it's sql server then use the ADO.Net classes .Net provides. Google: ado.net xml sql server[^]

      S 1 Reply Last reply
      0
      • O originSH

        If it's sql server then use the ADO.Net classes .Net provides. Google: ado.net xml sql server[^]

        S Offline
        S Offline
        srivatsan24
        wrote on last edited by
        #3

        I want to create a XML document in the filesystem out of the XML that is coming from the table column. The column is of type Xml. So how will i do it. I understand that we can use the ADO classes when oing an updation into the column. How to get it into the code from the database table column? Srivatsan

        K O 2 Replies Last reply
        0
        • S srivatsan24

          I want to create a XML document in the filesystem out of the XML that is coming from the table column. The column is of type Xml. So how will i do it. I understand that we can use the ADO classes when oing an updation into the column. How to get it into the code from the database table column? Srivatsan

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          If your sql server is sql 2005 then there is an xml type in sql 2005 that you can use. If you are using sql 2000 then you have to convert your xml type in .net to a string and save it in a text column. Hope that helps. Ben

          1 Reply Last reply
          0
          • S srivatsan24

            I want to create a XML document in the filesystem out of the XML that is coming from the table column. The column is of type Xml. So how will i do it. I understand that we can use the ADO classes when oing an updation into the column. How to get it into the code from the database table column? Srivatsan

            O Offline
            O Offline
            originSH
            wrote on last edited by
            #5

            You start off by learning the C# syntax, then you get used to using the BCL (Base Class Libarys) and then you read up on the specifics of using ADO.Net. You'll see that I gave a link to google with the appropriate keywords to help you find what you want. If that's no good there are plenty of books out there on how to do this.

            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