Link to home
Start Free TrialLog in
Avatar of IzzyTwinkly
IzzyTwinklyFlag for United States of America

asked on

Where is my xml file stored at?

Hi,
My understanding is that the following two lines of code will store the result as files.  Where are these files created at after I executed the whole code?
ds.WriteXmlSchema("dscSchema.xsd");
ds.WriteXml("dsc.xml");

using System;
using System.Data;
using System.Data.SqlClient;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string conStr = "Server=localhost; user id=sa; password=; database=northwind";
            SqlConnection conn = new SqlConnection(conStr);
            conn.Open();
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand("select * from Address", conn);
            DataSet ds = new DataSet();
            adapter.Fill(ds);
            conn.Close();

            string dsXmlSc = ds.GetXmlSchema();
            string dsXml = ds.GetXml();
            Console.WriteLine("------------XML Schema-------------");
            Console.WriteLine(dsXmlSc);
            Console.WriteLine("--------Print out as XML-----------");
            Console.WriteLine(dsXml);
            ds.WriteXmlSchema("dscSchema.xsd");
            ds.WriteXml("dsc.xml");

            Console.Read();
        }// main
    }// class
}
ASKER CERTIFIED SOLUTION
Avatar of williamcampbell
williamcampbell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or the location where the exe is installed