【发布时间】:2016-04-27 16:00:29
【问题描述】:
这是我的代码,没有输出。 我想要如图所示的实例列表
namespace InstanceList
{
class Program
{
static void Main(string[] args)
{
string cmd = "SQLCMD -L" ;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.Arguments = cmd;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
string output = proc.StandardOutput.ReadToEnd();
}
}
}
【问题讨论】:
标签: c# sql-server-2008 ssis sql-server-2012 ssis-2012