WINFORMS里调用ORACLE存储过程出错,希望大家帮我看看
在写代码时需要执行存储过程然后返回一个dataset的集合,
存储过程如下:
create or replace procedure P_YW_TRACK_OUT_YDWF
( p_dt_start in date ,
p_dt_end in date ,
p_Scan_site in varchar2,
p_NEXT_SITE in varchar2,
resultset in out pkg_return_resultset.resultset )
is
begin
open resultset for
select YWORDER,SIGNINOUTSCANTIME,NEWINOUTSTATESITE AS Scan_site,
SIGNINOUTNEXTSITE as NEXT_SITE,PCS,CREATOR from t_yw_order
where SIGNINOUTSCANTIME between p_dt_start and p_dt_end
and NEWINOUTSTATE='01' and
(CASE WHEN p_NEXT_SITE IS NULL THEN '1' ELSE NEWINOUTSTATESITE END )=
(CASE WHEN p_NEXT_SITE IS NULL THEN '1' ELSE p_NEXT_SITE END ) and SIGNINOUTNEXTSITE=p_Scan_site;
end;
我调用存储过程时传入了相应的参数,但是执行时却出现下面的错误:
错误描述:ORA-06550: 第 1 行, 第 39 列:
PLS-00103: 出现符号 ":"在需要下列之一时:
( - + case mod new not null
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> avg count current exists max min prior sql
stddev sum variance execute forall merge time timestamp
interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串>
符号 "(在 ":" 继续之前已插入。
ORA-06550: 第 1 行, 第 64 列:
PLS-00103: 出现符号 ":"在需要下列之一时:
( - + case mod new not null
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> avg count current exists max min prior sql
stddev sum variance execute forall merge t
ORA-06550: 第 1 行, 第 90 列:
PLS-00103: 出现符号 ":"在需要下列之一时:
( - + case mod new not null
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> avg count current exists max min prio
然后我把传入的参数放到PL/SQL里执行的时候存储过程可以执行通过的,大家帮我看看是哪里出了问题,谢谢大家了。