Transfer XML data
<p>When SQL is offline, I tried to send data in SQL through Xml but xml data is not transfered.</p>

<p>Code is here:</p>

<pre><code>DataRow[] shouldInserted = AMSParent.con.dst.Tables["dept_tbl"].Select("dept_name='" + dept_txt.Text.ToString() + "'");

if (shouldInserted.Length == 0)
{
   DataRow dr = AMSParent.con.dst.Tables["dept_tbl"].NewRow();
   dr["dept_name"] = dept_txt.Text;

   AMSParent.con.dst.Tables["dept_tbl"].Rows.Add(dr);
   AMSParent.con.dst.Tables["dept_tbl"].AcceptChanges();
   AMSParent.con.dst.AcceptChanges();

   AMSParent.con.dst.WriteXml(Application.StartupPath + "\\offlineTables.xml", XmlWriteMode.WriteSchema);
   try { File.Delete(Application.StartupPath + "\\offlineTables.con"); }
   catch { }

   encdec.Encrypt(Application.StartupPath + "\\offlineTables.xml", Application.StartupPath + "\\offlineTables.con", "");

   try { File.Delete(Application.StartupPath + "\\offlineTables.xml"); }
   catch { }

   dept_txt.Text = "";
   MessageBox.Show("Successfully added");
</code></pre>

<p>Is there any solution? Thanks!</p>
