I am stuck on the line when I am trying to insert the records into the db.
Thanks. John
classTPL TPL = new classTPL(_DatabaseConnection);
if (!File.Exists(this.tbSelectFile.Text))
throw new Exception(“Input file not found!”);
if (!File.Exists(@”e:\TPLImport.xml”))
throw new Exception(“Mapping file not found.”);
// we got the file here so lets open it and start the import process
//Create a clsKEAImport
if (checkBoxRecreate.Checked)
{
TPL.Recreate();
}
DateTime importtime = DateTime.Now;
TPL.Initialize();
TPL.importTime = importtime;
List> records = ParseFile(this.tbSelectFile.Text);
// Ok now lets insert that thing into the database
foreach (List
{
foreach (Field field in record)
{
TPL.Insert();
}
lblStatus.Text = “Records Inserted = ” + records.ToString();
lblStatus.Refresh();
Application.DoEvents();
}