private void ButtonViewQuizAsXml_Click(object sender, System.EventArgs e) { //Connect to the Quiz database string sConn = "Provider=Microsoft.JET.OLEDB.4.0;" + "data source=c:/inetpub/wwwroot/scripting/_private/Quizzes.mdb"; OleDbConnection dbConnection = new OleDbConnection(sConn); OleDbDataAdapter dataAdapter = new OleDbDataAdapter(); //Select the tables from the database into a dataset DataSet dsQuiz = new DataSet(); string sCommand = "SELECT * FROM Log"; dataAdapter.SelectCommand = new OleDbCommand(sCommand, dbConnection); dataAdapter.Fill(dsQuiz,"Log"); sCommand = "SELECT * FROM Answers"; dataAdapter.SelectCommand = new OleDbCommand(sCommand, dbConnection); dataAdapter.Fill(dsQuiz,"Answers"); sCommand = "SELECT * FROM Scores"; dataAdapter.SelectCommand = new OleDbCommand(sCommand, dbConnection); dataAdapter.Fill(dsQuiz,"Scores"); //Write the dataset into an XML file dsQuiz.WriteXml("c:/temp/Quiz.xml",XmlWriteMode.WriteSchema); Response.Redirect("c:/temp/Quiz.xml"); }