0
这就是我输入的内容。它将构建没有错误。但使我对空错误:获取NullReferenceException未处理
"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();