private void First_use_FormClosing(object sender, FormClosingEventArgs e) { try { scsql.Execute_Insert_Update(Properties.Settings.Default.Misc_DBConnectionString, "DELETE FROM co_nfo"); scsql.Execute_Insert_Update(Properties.Settings.Default.Misc_DBConnectionString, "INSERT INTO co_nfo VALUES('" + textBox2.Text + "','" + textBox4.Text + "','" + textBox6.Text + "','" + textBox5.Text + "','" + textBox7.Text + "','" + textBox1.Text + "','" + textBox3.Text + "')"); if (Main.Amatrix.doc != "") { Base_ASQL.BASQL b = new Base_ASQL.BASQL(); DataTable dtpy = new DataTable(); b.Execute(Main.Amatrix.doc, "DELETE FROM co_nfo", "", dtpy); b.Execute(Main.Amatrix.doc, "INSERT INTO co_nfo VALUES('" + textBox2.Text + "', '" + textBox4.Text + "', '" + textBox6.Text + "','', '" + textBox5.Text + "','','','', '" + textBox7.Text + "','','" + "INF-" + DateTime.Now.ToString() + DateTime.Now.Ticks.ToString() + "')", "", dtpy); dtpy.Clear(); dtpy.Dispose(); } } catch (Exception erty) { Am_err ner = new Am_err(); ner.tx("Unable to Save Company Information Data. (" + erty.Message + ")"); e.Cancel = true; } }