Hello,
How to run command SQLLoader Oracle in c#. I try my sourcode for run this SQLLoader, but nothing happen and error "No process is associated with this object.". Please tell me how i fix it. Thanks.
This is my code:
System.Diagnostics.Process process1;
process1 = new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
string strCmdLine;
strCmdLine = @"/C SQLLDR XL/secreat@O11G CONTROL=E:\APT\LoadXL.ctl";
System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
process1.WaitForExit();
process1.Close();
Loading

Guest UserRank #1,422 · 1.2K reputationPosted Mar 10, 2011, 4:25 AM EST
Process p = new Process();
p.StartInfo.FileName = @"
p.StartInfo.Arguments = @"
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = false;
p.Start();
p.WaitForExit();
p.Close();
Suthish NairRank #92 · 22.8K reputationPosted Mar 12, 2011, 7:51 AM EST
Datta KharadRank #2,135 · 668 reputationPosted Feb 25, 2012, 12:26 AM EST
I got same error while calling SQLLoader Oracle in c#. I am trying for run this SQLLoader, but out of 80000 rows only 71000 rows inserted into table and lastly throwing error "No process is associated with this object." at process1.WaitForExit();. Please tell me how i remove this error. Thanks.
This is my code:
System.Diagnostics.Process process1;
process1 = new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
string strCmdLine;
strCmdLine = @"/C SQLLDR user/pwd@O11G CONTROL=D:\ControlFile.ctl";
System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
process1.WaitForExit();
process1.Close();
Datta KharadRank #2,135 · 668 reputationPosted Mar 1, 2012, 11:43 PM EST
I got solution on above problem. See the below Solved Solution
http://www.c-sharpcorner.com/Forums/Thread/162723/call-sql-loader-from-C-Sharp.aspx