

sql ="select cod_tramite, categoria, ORC, Num_Libro, Partida, Folio, Fecha_ins,Nombres_ins, ApPat_ins, ApMat_ins, Depto, Prov, Localidad from tramites_TEMP Where cod_Tramite='"+ dgrTramites.Items[i].Cells[2].Text +"' group by cod_tramite, categoria, ORC, Num_Libro, Partida, Folio, Fecha_ins,Nombres_ins, ApPat_ins, ApMat_ins, Depto, Prov, Localidad";
SqlCommand cmdLib = new SqlCommand(sql, conexion);
SqlDataReader dr = cmdLib.ExecuteReader();
while(dr.Read())
{
Label1.Text = Convert.ToString(dr["cod_tramite"]);
drop.Items.Add(Convert.ToString(dr["cod_tramite"]));
sql = "insert into tbl_Libro0(cod_tramite)Values(@cod_tramite)";
SqlCommand cmdInsert = new SqlCommand(sql, conexion);
cmdInsert.Parameters.Add("@cod_tramite", SqlDbType.Char, 10);
cmdInsert.Parameters["@cod_tramite"].Value = Convert.ToString(dr["cod_tramite"]);
cmdInsert.ExecuteNonQuery();
conexion.Close();
}
dr.Close();
ahora no se me sale el siguiente error,
"There is already an open DataReader associated with this Connection which must be closed first"
no se como debo hacerlo estoy con esto dos dias

