C# Execute sqlldr & get return Code

Hi Experts,
 How do I execute sqlldr (SQL loader) in C# & how to receive the return code if succeeded or not?

The server is Windows.

Thanks
Jamil MuammarAsked:
Who is Participating?
 
Dustin SaundersConnect With a Mentor Director of OperationsCommented:
Looks like you launch it with System.Diagnostics.Process.

string cmd;
cmd = @"/c sqlldr <arguments go here>l";
System.Diagnostics.Process p1;
p1 = System.Diagnostics.Process.Start("cmd.exe", cmd);
p1.WaitForExit();

Open in new window


Then you can check for
if (p1.HasExited)

Open in new window

to get
p1.ExitCode

Open in new window

0
 
Ryan ChongCommented:
>>How do I execute sqlldr (SQL loader) in C# & how to receive the return code if succeeded or not?

does the SQL loader got program interface to accept input and generate return code?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.