读书人

这段代码如何不起作用?求教

发布时间: 2012-05-01 12:48:58 作者: rapoo

这段代码怎么不起作用?求教!
int ll_i,ll_id
ll_id=integer(sle_id.text)
......
//检查学号有无重号
select student.stud_id
into :ll_i
from student
where student.stud_id=:ll_id;
if ll_i<>0 then
messagebox("错误信息","学号第"+string(ll_i)+"号重号!请改正")
sle_id.setfocus()
return
end if

[解决办法]
不起作用是什么意思?你可以执行sql 语句时,查看sqlca.sqlcode返回值,看是不是sql 语句有问题。

select student.stud_id
into :ll_i
from student
where student.stud_id=:ll_id;

读书人网 >PB

热点推荐