Home > Net >  C # exp export
C # exp export

Time:10-14


As such, can use a console or other WinForm program, but moved to I won't work in the project, which bosses know what?

CodePudding user response:

CMD. StartInfo. FileName you can execute it, here, and your oracle service name is the same

CodePudding user response:

This can be executed, orcle inside of exp. Exe files, in other winform or console can perform!

CodePudding user response:

reference 1st floor ManBOyyy response:
CMD. StartInfo. The fileName you can perform here, and your oracle service name is the same?

Yes this can be run directly in CMD to succeed!

CodePudding user response:

Direct your exp command writes dat program execution inside dat file easier

CodePudding user response:

refer to the second floor qq_45070376 response:
this can be performed, orcle inside of exp. Exe file, the other winform or console can perform!

That you interrupt debugging, take a look at other can run, where as in the debug console parameter, what's your project parameters

CodePudding user response:

You try this function
 
///& lt; Summary>
///run the CMD command
///& lt;/summary>
///& lt; Param name="dosCommand & gt;" CMD command line & lt;/param>
///& lt; Param name="milliseconds" & gt; 0
///& lt; Returns>
Public static string RunCommand (string dosCommand, int milliseconds)
{
String output="";//output string
If (dosCommand!=null & amp; & DosCommand!="")
{
Process Process=new Process ();//create the process object
ProcessStartInfo startInfo=new ProcessStartInfo ();
StartInfo. FileName="CMD. Exe";//set to execute commands
StartInfo. The Arguments="/" C + dosCommand;//set the parameters, the execution of the command "/C" said exit immediately after
StartInfo. UseShellExecute=false;//do not use the system shell start
StartInfo. RedirectStandardInput=false;//not redirect input
StartInfo. RedirectStandardOutput=true;//redirecting output
StartInfo. RedirectStandardError=true;
StartInfo. CreateNoWindow=true;//do not create window
Process. StartInfo=StartInfo;
Try
{
If (process. The Start ())//process
{
If (milliseconds==0)
Process. WaitForExit ();//here infinite waiting for the end of the process
The else
Process. WaitForExit (milliseconds);//when more than the milliseconds later, no matter how the results are no longer perform the DOS command
The output=process. StandardOutput. ReadToEnd ();//read process output
If (the output=="")//running failure return reason
The output=process. StandardError. ReadToEnd ();
}
}
Catch
{
}
The finally
{
If (the process!=null)
Process. The Close ();
}
}
Return the output;
}
  •  Tags:  
  • C#
  • Related