بســم الله الـرحمــن الرحيــم
sql = "select employe_no from table1 "
con.Open()
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
dr = cmd.ExecuteReader
Do While dr.Read
sql = "insert into table2 (employe_no)values (,'" & dr.Item("employe_no) & "')"
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.ExecuteNonQuery()
Loop
dr.Close()
Close_Con()
يعطي الرسالة الخاطئة التالية
There is already an open DataReader associated with this Command which must be closed first.