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. Restoring DataBase Via XML file

Restoring DataBase Via XML file

Scheduled Pinned Locked Moved ASP.NET
databasexmlhelp
6 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.
  • R Offline
    R Offline
    RajaAhmed
    wrote on last edited by
    #1

    Can any one help me i want to restore my database. All data saved in xml file. is there any way i can restore it with constraints...

    C S 2 Replies Last reply
    0
    • R RajaAhmed

      Can any one help me i want to restore my database. All data saved in xml file. is there any way i can restore it with constraints...

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Where did the XML come from ? Does it contain data that defines the constraints ? If the program that generatedt he XML cannot restore it, you'll need to write code to do that.

      Christian Graus Driven to the arms of OSX by Vista.

      R 1 Reply Last reply
      0
      • R RajaAhmed

        Can any one help me i want to restore my database. All data saved in xml file. is there any way i can restore it with constraints...

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

        Hi, first of all, what kind of database is it? How did you get the xml files? Regards Sebastian

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        R 1 Reply Last reply
        0
        • C Christian Graus

          Where did the XML come from ? Does it contain data that defines the constraints ? If the program that generatedt he XML cannot restore it, you'll need to write code to do that.

          Christian Graus Driven to the arms of OSX by Vista.

          R Offline
          R Offline
          RajaAhmed
          wrote on last edited by
          #4

          i have got the file from the following code myds.Tables.Add(db.GetData("select * from tblAdmin").tables(0).copy()) myds.Tables(0).TableName = "Admin" myds.Tables.Add(db.GetData("select * from tblAM").tables(0).copy()) myds.Tables(1).TableName = "AM" myds.Tables.Add(db.GetData("select * from tblAMDepartmentLocation").tables(0).copy()) myds.Tables(2).TableName = "Am Dep Loc" . . . . . . Dim strPath As String = HttpContext.Current.Server.MapPath("~\Backup\backup.xml") myds.WriteXml(strPath) and data also contains constraints... plz i need help.......

          1 Reply Last reply
          0
          • S SeMartens

            Hi, first of all, what kind of database is it? How did you get the xml files? Regards Sebastian

            It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

            R Offline
            R Offline
            RajaAhmed
            wrote on last edited by
            #5

            i have got the file from the following code myds.Tables.Add(db.GetData("select * from tblAdmin").tables(0).copy()) myds.Tables(0).TableName = "Admin" myds.Tables.Add(db.GetData("select * from tblAM").tables(0).copy()) myds.Tables(1).TableName = "AM" myds.Tables.Add(db.GetData("select * from tblAMDepartmentLocation").tables(0).copy()) myds.Tables(2).TableName = "Am Dep Loc" . . . . . . Dim strPath As String = HttpContext.Current.Server.MapPath("~\Backup\backup.xml") myds.WriteXml(strPath) and data also contains constraints... plz i need help.......

            S 1 Reply Last reply
            0
            • R RajaAhmed

              i have got the file from the following code myds.Tables.Add(db.GetData("select * from tblAdmin").tables(0).copy()) myds.Tables(0).TableName = "Admin" myds.Tables.Add(db.GetData("select * from tblAM").tables(0).copy()) myds.Tables(1).TableName = "AM" myds.Tables.Add(db.GetData("select * from tblAMDepartmentLocation").tables(0).copy()) myds.Tables(2).TableName = "Am Dep Loc" . . . . . . Dim strPath As String = HttpContext.Current.Server.MapPath("~\Backup\backup.xml") myds.WriteXml(strPath) and data also contains constraints... plz i need help.......

              S Offline
              S Offline
              SeMartens
              wrote on last edited by
              #6

              So I assume that you myds is a dataset. The DataSet class contains a method for reading xmls. Use this method with all your xml files. But pay attention, you have to use a different dataset for every single xml file. After you read the files you can merge all datasets into one. The ReadXml-Method: http://msdn.microsoft.com/en-us/library/360dye2a(VS.80).aspx[^] And here the description for loading more than one file: http://msdn.microsoft.com/en-us/library/fx29c3yd(VS.71).aspx[^] (scroll to the bottom). Regards Sebastian

              It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

              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