急……在线等候,PB的存储过程问题

zhaoyu2003 2004-01-29 04:03:40
存储过程:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



ALTER procedure procedure1
@goodname varchar(100),
@output1 varchar(100) output,
@output2 varchar(100) output
as
begin
select @output1=info_good.goodname,
@output2=info_good.goodcode
from info_good
where info_good.goodcode=@goodname
end


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

powerscript:
String ls_name,ls_code,ls_good,ls_null
ls_null=''
declare p_procedure1 procedure for procedure1
@goodname=:ls_name,
@output1=:ls_null output,
@output2=:ls_null output;
execute p_procedure1;
messagebox('',sqlca.sqlerrtext)
fetch p_procedure1 into :ls_code,:ls_good;
close p_procedure1;
messagebox('',ls_code+ls_good)
sle_2.text=ls_code
sle_3.text=ls_good

错误信息:
Space must be allocated for bind parameter!

能不能说说这是怎么回事?
...全文
58 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
coordinate 2004-01-30
  • 打赏
  • 举报
回复
1.String ls_name,ls_code,ls_good,ls_null
declare p_procedure1 procedure for procedure1
@goodname=:ls_name,
@output1=:ls_null output,
@output2=:ls_null output;
写成
String ls_name,ls_code,ls_good,ls_null,ls_null2
declare p_procedure1 procedure for procedure1
@goodname=:ls_name,
@output1=:ls_null output,
@output2=:ls_null2 output;
也就是说在参数那不写两个ls_null
2.再试试
ls_name=space(100)
ls_null=space(100)
msdn_vipuser 2004-01-30
  • 打赏
  • 举报
回复
up!!
sinkiangscorpio 2004-01-30
  • 打赏
  • 举报
回复
关注
zhaoyu2003 2004-01-30
  • 打赏
  • 举报
回复
TO:coordinate(什么)
按此要求则出现错误:
“对于造型出现无效的字符!”
huangxinru 2004-01-29
  • 打赏
  • 举报
回复
Sorry!的确可以不加续行符
zhaoyu2003 2004-01-29
  • 打赏
  • 举报
回复
高手呀……
huangxinru 2004-01-29
  • 打赏
  • 举报
回复
up
zhaoyu2003 2004-01-29
  • 打赏
  • 举报
回复
好像和续行没关系吧……我试了,还是不行呀……救俺呀
huangxinru 2004-01-29
  • 打赏
  • 举报
回复
你这里应该加续行符,试一下
declare p_procedure1 procedure for procedure1
@goodname=:ls_name,&
@output1=:ls_null output,&
@output2=:ls_null output;
execute p_procedure1;
zhaoyu2003 2004-01-29
  • 打赏
  • 举报
回复
赋了值也是一样的错误呀
huangxinru 2004-01-29
  • 打赏
  • 举报
回复
在调用存储过程前,ls_name未赋值

754

社区成员

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

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