Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/09/2008, 05:47
Ose_hash
 
Fecha de Ingreso: abril-2008
Mensajes: 9
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: c#: VS2003, DataReader a DataTable

He encontrado esto por ahi:
Código:
        SqlDataReader dr = comm.ExecuteReader();
        DataTable dt = new DataTable();
      
        //method 1 
        dt.load(dr);

        //method 2
        //while (dr.Read())
        //{
        //    DataRow row = dt.NewRow();
        //    row["apname"] = dr["apname"].ToString();
              //continue other rows.
        //    dt.Rows.Add(row);
        //}
A ver si vale!