这是我输入的。它将毫无错误地构建。但是给了我一个空错误:
"MySqlConnection = new SqlConnection"(MyConnectionString.ConnectionString);
我正在使用 VS2010 C#...
MyConnectionString = ConfigurationManager.ConnectionStrings["Data Source=sql1;Initial Catalog=DW_screening;Persist Security Info=True;User ID=xxxxx;Password=xxxxxx;Write"];
MySqlConnection = new SqlConnection(MyConnectionString.ConnectionString);
MySqlConnection.Open();
MessageBox.Show("Connection Opened Successfully");
//MySqlConnection.Close();