PB调用ORACEL过程时候,出现:数字或值错误:字符串缓冲区太小

liaicheng12 2013-08-13 11:03:45
大神,再不救就要出事了啊啊啊。。
我在调用plsql的过程中,这个问题反复出现,现贴一个简略的例子。
存储过程
 function check_actionata(p_actionata defect.actionata%type,
p_actype orders.actype%type,
p_return out varchar2) return number is
l_count number;
begin
if trim(p_actionata) is null then
p_return := null;
return 1;
end if;
if trim(p_actype) is null then
select count(ata)
into l_count
from ata
where trim(ata) = trim(p_actionata)
and not_for_defect is null;
else
select count(ata)
into l_count
from ata
where trim(actype) = trim(p_actype)
and trim(ata) = trim(p_actionata)
and not_for_defect is null;
end if;
if l_count = 0 then
p_return := zh_pub_function.get_message('DEFECT', -7);
return 0;
end if;
p_return := null;
return 1;
end check_actionata;

调用语句
if dwo.name = 'ata' then
data = trim(data)
ls_actype = trim(ls_actype)
ls_return = trim(ls_return)
sqlca.check_actionata( data, ls_actype, ls_return)
messagebox('提示',sqlca.sqlerrtext)
if trim(ls_return) <>'' then
else
messagebox('提示',ls_return)
end if
end if

拜谢~!
...全文
118 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
liaicheng12 2013-08-13
  • 打赏
  • 举报
回复
defect.actionata%type, orders.actype%type都是char类型,长度不超过10的。
liaicheng12 2013-08-13
  • 打赏
  • 举报
回复
up~!
liaicheng12 2013-08-13
  • 打赏
  • 举报
回复
只是看看不说话,还是压根没看到呢?

752

社区成员

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

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