循环体中间,没有对循环变量进行修改,你这是一个死循环。do until i<=n+4 str_sql = "select emp_id, emp_fname, birth_date from employee where emp_id='i' " dw_1.settransobject(sqlca) dw_1.setsqlselect(str_sql) dw_1.retrieve() 在这里应该添加一条修改循环变量的语句的,比i=i-1等等loop