爱上老鼠的pug 爱上老鼠的pug
关注数: 4 粉丝数: 4 发帖数: 243 关注贴吧数: 1
新人求教 C#与MSSQL问题 C#求教 想把textbox中的内容 输入到MSSQL中执行 且输出执行结果 (数据库连接建立成功) 代码如下: try             {                 Process process = new Process();                 //设定程序名                 process.StartInfo.FileName = "";                 //关闭Shell的使用                 process.StartInfo.UseShellExecute = false;                 //重定向标准输入                 process.StartInfo.RedirectStandardInput = true;                 //重定向标准输出                 process.StartInfo.RedirectStandardOutput = true;                 //重定向错误输出                 process.StartInfo.RedirectStandardError = true;                 //设置显示窗口                 process.StartInfo.CreateNoWindow = true;                 process.Start();                 process.StandardInput.WriteLine(txbCmd.Text);                 //process.StandardInput.WriteLine("Exit");                 string restr = process.StandardOutput.ReadToEnd();                 //lstbRslt.Items.Clear();                 lstbRslt.Items.Add(restr);             }             catch (ApplicationException exm)             {                 lstbRslt.Items.Add(exm.Message.ToString());             } 请问: process.StartInfo.FileName = "";中应该写哪个进程名
1 下一页