使用update语句无法更新数据库

PBtoohard 2020-05-15 11:46:23
cb_1 click事件
int a,b
decimal rp,bn
select max(typenum)
into :a
from type;
for b=1 to a
select roomprice
into :rp
from "type"
where "type"."typenum"=:b;
bn=rp*0.9
update "type"
set "type"."roomprice"=:bn
where "type"."typenum"=:b
using SQLCA;
commit using SQLCA;
dw_1.retrieve()
b=b+1
next
没有报错,但就是什么反应都没有,取a值没有问题,就是不能更新。
...全文
454 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
PBtoohard 2020-05-15
  • 打赏
  • 举报
回复

是我sqlerrtext写错了吗?
PBtoohard 2020-05-15
  • 打赏
  • 举报
回复
引用 1 楼 aolixiaox 的回复:
messagebox 输出sqlerrtext看看,具体出错原因

是一个空的,只有一个蓝色的感叹号
aolixiaox 2020-05-15
  • 打赏
  • 举报
回复
messagebox 输出sqlerrtext看看,具体出错原因
aolixiaox 2020-05-15
  • 打赏
  • 举报
回复
写在 commit 前

740

社区成员

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

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