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