I'm trying to open a command prompt through the program and then run bcp. Here is the code.
System.Diagnostics .Process proc = new System.Diagnostics.Process ();
proc.StartInfo.FileName = "bcp";
proc.StartInfo.Arguments = @"select * from dbname" queryout C:\filename.csv -S servername\instance -U sa -P password –N;
proc.Start ();
On the queryout I get an error "; expected"
Any thoughts?