首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

问个简单的有关问题动态sql语句的参数

2012-02-29 
问个简单的问题动态sql语句的参数LsSQL update lxscq set zhshh :maxzhshhwhere bh :bhexecute imm

问个简单的问题动态sql语句的参数
LsSQL = "update lxscq set zhshh = :maxzhshh where bh =:bh"
execute immediate :LsSQL using sqlca;

这样写有问题吗?怎么存不了数据呢?

[解决办法]
有问题
要么这样:
update lxscq set zhshh = :maxzhshh where bh =:bh;
要么这样:
LsSQL = "update lxscq set zhshh = " + string(maxzhshh) + " where bh = " + string(bh)
execute immediate :LsSQL using sqlca;
[解决办法]
LsSQL = "update lxscq set zhshh = '" + string(maxzhshh) + "' where bh = " + string(bh)
execute immediate :LsSQL using sqlca;

热点排行