Hi Guys , I am trying to load a xml file as follows and i am getting file not found exception even though the file is on the desktop.I have checked the file name and extension they are correct , can anyonehelp please
private void button1_Click(object sender, EventArgs e)
{ string myString;
string sXMLFilePath = @"C:\\Dict0.xml";
XmlDocument document = new XmlDocument();
document.Load(sXMLFilePath);
XmlNodeList nodelist = document.SelectNodes("string");
SqlConnection cn = new SqlConnection(@"Server=208.124.179.197;Database=RTLUser;UID=sa;");
SqlDataAdapter da = new SqlDataAdapter();
foreach (XmlNode node in nodelist)
//cn.ConnectionString = "Server=server;Database=RTLUser;UID=sa;";
cn.Open();
myString = @"INSERT INTO wordTbl(word,level) Values('" + nodelist + "','" + "0" + "')";
SqlCommand myCmd = new SqlCommand(myString, cn);
myCmd.ExecuteNonQuery();
cn.Close();
}
}