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. Web Development
  3. ASP.NET
  4. How do we convert a data from database into XMLfile using asp.net with vb.net

How do we convert a data from database into XMLfile using asp.net with vb.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabase
4 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.
  • V Offline
    V Offline
    vbmadhavi
    wrote on last edited by
    #1

    hello all How do we convert a data from database into XMLfile using asp.net with vb.net i dont now such idea plzz send code also.

    N 1 Reply Last reply
    0
    • V vbmadhavi

      hello all How do we convert a data from database into XMLfile using asp.net with vb.net i dont now such idea plzz send code also.

      N Offline
      N Offline
      Nuri Ismail
      wrote on last edited by
      #2

      You can use DataSet[^] to load your database and after that you can call DataSet.WriteXml[^] method.

      vbmadhavi wrote:

      plzz send code also.

      Writing your code is your responsibility. Just search for DataSet tutorials, you will find lots of information. :) I hope this helps. :)

      S 1 Reply Last reply
      0
      • N Nuri Ismail

        You can use DataSet[^] to load your database and after that you can call DataSet.WriteXml[^] method.

        vbmadhavi wrote:

        plzz send code also.

        Writing your code is your responsibility. Just search for DataSet tutorials, you will find lots of information. :) I hope this helps. :)

        S Offline
        S Offline
        Sanjay Jaiswal 1234567
        wrote on last edited by
        #3

        use Query From database Which gives to XML String. For Example: Select * from emp "Emplyee" FOR XML Auto Which gives out put like <Emplyee empid="11" ename="rajan" sal="1.200000000000000e+004" ephone="5654645" eAddress="baneshwor" /> <Emplyee empid="12" ename="pravakar" sal="2.500000000000000e+004" ephone="5654645" eAddress="shantinangar" /> <Emplyee empid="13" ename="nilu" sal="2.500000000000000e+004" ephone="5654645" eAddress="ghattekkulo" /> <Emplyee empid="14" ename="shekhar" sal="2.500000000000000e+004" ephone="5654645" eAddress="ekantakuna" /> <Emplyee empid="15" ename="sunil" sal="2.500000000000000e+004" ephone="5654645" eAddress="budanilakantha" /> <Emplyee empid="16" ename="Nilubhai" sal="2.000000000000000e+003" ephone="123456" eAddress="Kathmandu" />

        N 1 Reply Last reply
        0
        • S Sanjay Jaiswal 1234567

          use Query From database Which gives to XML String. For Example: Select * from emp "Emplyee" FOR XML Auto Which gives out put like <Emplyee empid="11" ename="rajan" sal="1.200000000000000e+004" ephone="5654645" eAddress="baneshwor" /> <Emplyee empid="12" ename="pravakar" sal="2.500000000000000e+004" ephone="5654645" eAddress="shantinangar" /> <Emplyee empid="13" ename="nilu" sal="2.500000000000000e+004" ephone="5654645" eAddress="ghattekkulo" /> <Emplyee empid="14" ename="shekhar" sal="2.500000000000000e+004" ephone="5654645" eAddress="ekantakuna" /> <Emplyee empid="15" ename="sunil" sal="2.500000000000000e+004" ephone="5654645" eAddress="budanilakantha" /> <Emplyee empid="16" ename="Nilubhai" sal="2.000000000000000e+003" ephone="123456" eAddress="Kathmandu" />

          N Offline
          N Offline
          Nuri Ismail
          wrote on last edited by
          #4

          You probably have to post this message to OP, too. Your suggestion is good in case we want to save only data as XML. But if we want to save entire database, including schema information except data, then DataSet.WriteXml method is very handy. :) Regards

          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