提示:ORA-24338:未找到语句句柄D中仅仅就是调用该存储过程。且存储过程F8没提示错误。
{在Oracle板块提问,没人回答}
{在Oracle板块提问,没人回答}
解决方案 »
- 取memo数据进行查询
- CSDN真垃圾~~搜索出来的东西都打不到的
- 有关 DateTimePicker 出错的问题?
- 续“socket 数据量大问题!”[讨论]
- 急,请各位大狭指点,
- 大家帮忙看看,这个是干什么用的?菜鸟我不会~不懂
- 各位大哥!小弟有个Delphi6和数据库问题想请教一下?
- 50,请各位大哥帮帮小妹;(给老师、师兄、师弟们问好:))
- CustomDrawItem事件的问题
- 请教Tstring的AddObject方法的使用?
- 求助 Delphi dbExpress里的SQLConnection连接MSSQL报错(DLL/Shared Library Name not Set)
- 怎么将wav的声音放大后再输出?
游标没有打开的情况一般是忘记了写打开游标的语句,也可能是存储过程中执行出错,导致最后游标未打开。
如:CREATE OR REPLACE package BODY PK_PROFU_GetMtStopTimesInfo
is procedure GetMtStopTimesInfo
(
mMtName varchar2,
mycs out mytype
)
as
v_count int:=0;
begin select count(1) INTO v_count
FROM WPStopTimesInfo t,MachineTools s
WHERE s.matolname=mMtName AND t.mtid=s.matolid;
if(v_count>0) then
open mycs for select w.matolname , v.stoptimes
FROM WPStopTimesInfo v,MachineTools w
WHERE w.matolname=mMtName AND v.mtid=w.matolid
order by v.stoptimes desc ;
end if; END;
end;当上面的变量 v_count=0 时,将出现上述错误.将其修改成如下所示,问题解决:CREATE OR REPLACE package BODY PK_PROFU_GetMtStopTimesInfo
is procedure GetMtStopTimesInfo
(
mMtName varchar2,
mycs out mytype
)
as
v_count int:=0;
begin select count(1) INTO v_count
FROM WPStopTimesInfo t,MachineTools s
WHERE s.matolname=mMtName AND t.mtid=s.matolid;
if(v_count>0) then
open mycs for select w.matolname , v.stoptimes
FROM WPStopTimesInfo v,MachineTools w
WHERE w.matolname=mMtName AND v.mtid=w.matolid
order by v.stoptimes desc ;
else
open mycs for select mMtName as matolname,1 as stoptimes from dual;
end if; END;
end;
from TMP_STOREDISRPT;
if p_Count>1 then
insert into TMP_STOREDISRPT(FORGNO,FDISSELAMT,FRETBUYAMT,FRETSELAMT)
select '合计',sum(FDISSELAMT),sum(FRETBUYAMT),sum(FRETSELAMT)
from TMP_STOREDISRPT;
end if;而游标是这样的 if p_DataType='1' then
open returnInfo for
select a.forgno fsupno,b.faccountno,b.fsupname,fpayamt fpreamt,
a.fnumber1 frecamt,a.fnumber2 finvcamt,famt
from tmp_conaccrpt a
left join ts_supplier b on a.forgno=b.fsupno
order by 1;
else if p_DataType='2' then
open returnInfo for
select a.forgno,b.forgname,fpayamt fpreamt,
a.fnumber1 frecamt,a.fnumber2 finvcamt,famt
from tmp_conaccrpt a
left join ts_organize b on a.forgno=b.forgno
order by 1;
end if;
end if ;