Can you give me the logic to use the SqlBulkCopy to copy data table from SQL SERVER Datatable to text file.
this works below, but once I execute the bat file I have no way of knowing when its down, what I am doing is copying all data to text files, then afterwards, delete from the database. So is there a way to know if the bat file has finished executing berfore deleting from the database.
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = Directory.GetCurrentDirectory.;
if (File.Exists(RapidViewClient.Properties.Settings.Default.ExamplePath))
{
process.StartInfo.CreateNoWindow = false;
process.Start();
}
Loading
David SmithPosted Mar 9, 2012, 11:15 PM
process.StartInfo.FileName = Directory.GetCurrentDirectory + "TEST.bat";
if (File.Exists(RapidViewClient.Properties.Settings.Default.ExamplePath))
{
process.StartInfo.CreateNoWindow = false;
process.Start();
}