Can anybody explain me what I wrong I am doing in the following piece of code:
DataTable dt=SmoApplication.EnumAvailableSqlServer(true);
Server sr = new Server("Test");
foreach(DataBase db in sr.DataBases)
{
Console.WriteLine(db["name"]);
}
It gives an exception in sr.Databases
that can not be connected.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…