samsmithnz
Senior Contributor
I'm trying to run a BCP command from my VB.NET app. Currently it looks like this:
After I run this, I connect to a SQL Server and run a stored procedure that processes the data that was imported in. My problem is that this method doesn't wait for the bcp command to finish, and hence the stored procedure I call afterwards ALWAYS fails.
What can I do to wait for the BCP command to finish?
Code:
objCmdLine = New System.Diagnostics.ProcessStartInfo("bcp.exe")
objCmdLine.Arguments = strBCPString
Process.Start(objCmdLine)
After I run this, I connect to a SQL Server and run a stored procedure that processes the data that was imported in. My problem is that this method doesn't wait for the bcp command to finish, and hence the stored procedure I call afterwards ALWAYS fails.
What can I do to wait for the BCP command to finish?