string server = newServer;
string catalog = newCatalog;
string connectionString = "server=" + server + ";Initial Catalog=" + catalog + ";Persist Security Info=False";
SqlConnection connection = new SqlConnection(connectionString);
try
{
connection.Open();
}
catch (Exception e)
{
return false;
}
return true;
这个里面我用工具连接的时候是可以连通的,但是用sqlconnection链接却连不通,有谁知道为什么吗
我知道,但是连接字符串有规定的写法~
我知道,但是连接字符串有规定的写法~而且那个Persist Security Info=true也是错的。好奇怪