Torna al Thread
string query =" select recownid,RecMeA from rec,cmb where reccmbid = cmbownid and cmbownid="+cmb+" order by RecMeA";
SqlDataReader dr;
SqlCommand cmd = new SqlCommand(query,conn);
conn.Open();
dr = cmd.ExecuteReader();
while(dr.Read() == true)
{
int seq = Convert.ToInt32(dr.GetValue(1));
int id_rec = Convert.ToInt32(dr.GetValue(0));
string queryInsert = "....";
int new_id_rec = 0;
SqlCommand cmd1 = new SqlCommand(queryInsert,conn);
conn.open();
cmd1.ExecuteNonQuery();
conn.close();
}
dr.Close();
conn.Close();