بســم الله الـرحمــن الرحيــم
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