using (SqlConnection con = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["神氏default"雹氏].ConnectionString)) { SqlCommand cmd = new SqlCommand(); cmd.Connection = con; sqlStr = @""; cmd.CommandText = sqlStr ; cmd.CommandType = CommandType.Text; gs = cmd.ExecuteNonQuery(); } 这个就是直接执行sql语游肆散句的代码!