public DataTable Consultasql(string query) { SqlConnection cnn = ConexionSQL(); DataTable dt = new DataTable(); SqlDataAdapter adapter = new SqlDataAdapter(); SqlCommand commando = new SqlCommand(query, cnn); commando.CommandTimeout = 5 * 60; adapter.SelectCommand = commando; try { adapter.Fill(dt); } catch (Exception exp) { Classes.Class_Logs ClsLog = new Classes.Class_Logs(); this.InsertaInformacion(exp.ToString(), "consulta"); } cnn.Close(); return(dt); }