毕业设计—急selectblob 怎么老是死掉呢???

juedaidujiao 2006-05-27 06:22:52
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
...全文
212 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lzheng2001 2006-05-29
  • 打赏
  • 举报
回复
selectblob 之前先运行sqlca.autocommit=true

对于sybase及sqlserver 数据库需要设置sqlca.autocommit=true

billxia 2006-05-29
  • 打赏
  • 举报
回复
selectblob 必须在 sqlca.autocommit =true 下运行才好

752

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧