1
Answer

Executing bat file using bcp to copy datatable to text file

David Smith

David Smith

12y
2k
1
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();
      }

Answers (1)