毕业设计—急selectblob 怎么老是死掉呢???
do while xuanze > 0 ////////选择题抽取次数
rand1=rand(hao)
rand1 = rand1 + 100000
str1=string(rand1)
select 章节,题型,难度,选择标志 into :zhangjie,:tixing,:nandu,:xuanzhong from T_tiku
where 序号=:str1 using sqlca;
if xuanzhong = 0 then /////判断是否重复选择
if tixing="选择题" then
selectblob 内容 into :cneirong from T_tiku /////程序执行到这里大部分时候会死掉,
/////////只有很少时候运行通过!(偶尔可以运行啊)
where 序号=:str1 using sqlca;
selectblob 答案 into :cdaan from T_tiku
where 序号=:str1 using sqlca;
insert into T_shiti(章节,题型,难度,编号)
values(:zhangjie,:tixing,:nandu,:str1)using sqlca;
if sqlca.sqlcode<>-1 then
commit using sqlca;
sqlca.autocommit=true
updateblob T_shiti set 内容=:cneirong
where 编号=:str1 using sqlca;
updateblob T_shiti set 答案=:cdaan
where 编号=:str1 using sqlca;
sqlca.autocommit=false
update T_tiku set 选择标志=1
where 序号=:str1 using sqlca;
xuanze --
end if
else
rollback using sqlca;
end if
end if
end if
loop