如何从过程中将参数传递给CommandPrompt?

编程入门 行业动态 更新时间:2024-10-26 08:26:27
本文介绍了如何从过程中将参数传递给CommandPrompt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我需要使用sqlplus(ORACLE DB)执行插入脚本.在这里,我需要提示用户输入内容为drop,create和insert(DCI)或Create,insert(CI)或仅insert(I). 因此,根据用户给出的选项,我需要使用"sqlplus.exe"执行过程. 对此有何帮助. 在此先感谢.

Hi everyone, I have a requirement to execute the insert scripts using sqlplus(ORACLE DB). Here, I need to prompt the user to give input as drop, create and insert(DCI) or Create, insert(CI) or only insert(I). So based on the option given by user I need to perform process using "sqlplus.exe". Can any one help regarding this. Thanks in advance.

推荐答案

只需在进程的启动命令中提供启动参数以及exe. 例如 Simply provide the start parameters along with the exe in the start command of the process. e.g. Process.Start("IExplore.exe", "www.northwindtraders");

是什么命令提示符,CMD.EXE应用程序?有可能,您不需要它. 您可以按照Abhinav的建议直接使用System.Diagnostics.Process开始所需的过程,以阅读更多信息: msdn.microsoft/en-us/library/system.diagnostics.process.aspx [ ^ ].
—SA
Do you mean Command Prompt, CMD.EXE application? Chances are, you don''t need it. You can start the process you want directly, as Abhinav just suggested, using System.Diagnostics.Process, read for more information: msdn.microsoft/en-us/library/system.diagnostics.process.aspx[^].
—SA

更多推荐

如何从过程中将参数传递给CommandPrompt?

本文发布于:2023-10-29 03:23:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1538576.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   过程中将   CommandPrompt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!