String connString = System.Configuration.ConfigurationManager.ConnectionStrings["web"].ToString(); conn = new MySql.Data.MySqlClient.MySqlConnection(connString); conn.Open(); queryStr = ""; queryStr = "SELECT * FROM avance_actividad where idProyecto='" + idproy + "' and idObjetivo='" + obj.SelectedIndex + "' and idResultado='" + res.SelectedIndex + "' and idActividad='" + act.SelectedIndex + "'"; cmd = new MySql.Data.MySqlClient.MySqlCommand(queryStr, conn); //con.Open(); var reader = cmd.ExecuteReader(); while (reader.Read() && reader.HasRows) { // here could be problems if database value is null es.Text = reader["estado"].ToString(); com.Text = reader["comentario"].ToString(); por.Text = reader["porcentaje"].ToString(); } conn.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)