请教2个问题!请进!
数据库为sybase,pb5.0开发的程序。1.怎么样把每次应用开始连接数据库的参数对话框去掉?
2.如下脚本为何不能得到数据:
decimal hgl,fenzi,fenmu
string ls_1,ls_pici,ls_jiaolian,ls_sql
ls_pici=ddlb_1.text
declare cur_1 cursor for
select xm from t_jiaolian;
open cur_1;
fetch cur_1 into :ls_1;
do while sqlca.sqlcode= 0
select (count(kemu1)) into :fenmu from t_jbb where jiaolian=:ls_1 and pici=:ddlb_1.text and kemu1<>'未考试' and kemu2<>'未考试' and kemu3<>'未考试';
select (count(kemu1)) into :fenzi from t_jbb where jiaolian=:ls_1 and pici=:ddlb_1.text and kemu1='合格' and kemu2='合格' and kemu3='合格';
if fenmu=0 then hgl=0
if fenmu<>0 then hgl=round(fenzi/fenmu*100,2)
字段hel为declare类型。我在单机状态下运行正常,转到sybase中为何不行?多谢!
[此贴子已经被作者于2006-9-27 13:42:55编辑过]