[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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
}
0
IzzyTwinkly
Asked:
IzzyTwinkly
  • 2
1 Solution
 
williamcampbellCommented:
In bin debug
0
 
williamcampbellCommented:
Or the location where the exe is installed
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now