If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
How do you insert data into MSSQL
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<List<Field>> records = ParseFile(this.tbSelectFile.Text);
// Ok now lets insert that thing into the database
foreach (List<Field> record in records)
{
foreach (Field field in record)
{
TPL.Insert();
}
lblStatus.Text = "Records Inserted = " + records.ToString();
lblStatus.Refresh();
Application.DoEvents();
}