title: Load data from datareader
body: <p>I want to read from my response data reader object the column name and type, because i need it to instantiate some objects. I came out with this :</p>
  
  <pre><code>using (db.sqlConnection) {
      db.sqlConnection.Open();
      using (var cmd = new SqlCommand("areaGetStreetTypes", db.sqlConnection)) {
          cmd.CommandType = CommandType.StoredProcedure;
          using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.KeyInfo)) {
              DataTable dt = dr.GetSchemaTable();
              foreach (DataRow myField in dt.Rows) {
                  foreach (DataColumn coloana in dt.Columns) {
                      string c1 = coloana.ColumnName;  //column name ???
                      string c2 = coloana.GetType().ToString(); //column type ??
                      Console.WriteLine(c1 + "  " + c2);
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>but is not working. For each column returns i want to print (for starter) something like :</p>
  
  <pre><code>id_someID int32    
  name string    
  surname string     
  ssn string
  </code></pre>
  
  <p>what is wrong in my code?</p>