为什么用这个语句点确定后数据窗口没反映?

来源:百度知道 编辑:UC知道 时间:2024/05/13 08:47:04
查与一个学号最近的8名同学的记录
long i,n
string str_sql
n=long(sle_1.text)
i=n - 4
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()
loop
忘了,但加了i++也没什么变化

循环体中间,没有对循环变量进行修改,你这是一个死循环。
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