login register Sysop! about ME  

2022년 11월 28일 16시 22분 00초,     조회수 : 267
  제목 : asp 오라클 저장 프로시저 사용간 문의
SEQ : 164440 글쓴이 : sniperjj2003

작성 포맷 : TEXT 모드, 자동 줄바꿈 사용

아래와 같이 프로시저 생성 후 
PROCEDURE NETS1.OP_PROC (
  
  v_accession_no in VARCHAR2,
  o_cursor out sys_refcursor
)
 is  

BEGIN  
   open o_cursor for

 select OP_dttm ,OP_name  from  ( SELECT substr(DECODE (rn,1, bb, 2, dd, 3, ee, 4, gg, 5, ii),1,10) OP_dttm ,         
substr(DECODE (rn,1, bb, 2, dd, 3, ee, 4, gg, 5, ii),11) OP_name  from  ( select  rn, instr(ORM_FIELD7,'$',1,7) 
aa ,          substr(ORM_FIELD7,1,instr(ORM_FIELD7,'$',1)-1) ||substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1) + 
1,  instr(ORM_FIELD7,'$',1,2)-instr(ORM_FIELD7,'$',1)-1) bb,          
decode(instr(ORM_FIELD7,'$',1,2),0,null,substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,2) + 1,  
instr(ORM_FIELD7,'$',1,3)-instr(ORM_FIELD7,'$',1,2)-1) ||substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,3) + 1,  
instr(ORM_FIELD7,'$',1,4)-instr(ORM_FIELD7,'$',1,3)-1)) dd ,          
decode(instr(ORM_FIELD7,'$',1,4),0,null,substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,4) + 1,  
instr(ORM_FIELD7,'$',1,5)-instr(ORM_FIELD7,'$',1,4)-1) ||substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,5) + 1,  
instr(ORM_FIELD7,'$',1,6)-instr(ORM_FIELD7,'$',1,5)-1)) ee ,          
decode(instr(ORM_FIELD7,'$',1,6),0,null,substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,6) + 1,  
instr(ORM_FIELD7,'$',1,7)-instr(ORM_FIELD7,'$',1,6)-1) ||substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,7) + 1,  
instr(ORM_FIELD7,'$',1,8)-instr(ORM_FIELD7,'$',1,7)-1)) gg ,          
decode(instr(ORM_FIELD7,'$',1,8),0,null,substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,8) + 1,  
instr(ORM_FIELD7,'$',1,9)-instr(ORM_FIELD7,'$',1,8)-1) ||substr(ORM_FIELD7,instr(ORM_FIELD7,'$',1,9)+ 1)) 
ii   from SRPACSWT  , (SELECT ROWNUM rn FROM SRPACSWT WHERE ROWNUM <= 5) b   where  ORM_FIELD7 
IS NOT NULL    and placer_field1 = v_accession_no )  ) where OP_dttm is not null;     
                          
END OP_PROC;
* asp 구문 
Dim pid
pid = "2290241544"                        '프로시저에 들어갈 파라미터1


Set Cmd = Server.CreateObject("ADODB.Command")    'Command객체 선언
 
WITH Cmd    
 .ActiveConnection = DbCon 
 .CommandText = "NETS1.OP_PROC" '프로시저명
 .CommandType = adCmdStoredProc

  .Parameters.Append .CreateParameter("placer_field1", adVarChar, adParamInput, , pid)
  
  
  Set rs = .Execute
 
end with 

위와 같이 asp 구문 작성후 호출하면 

excute에서 에러가 나는거 같은데 end with 까지는 에러가 나지 않는데 

excute rs에 선언후 저장 후 호출시 오류가 납니다..

구문 작성간 혹시 틀린 부분이 있을까요?




제목 작성자 날짜 조회
asp 오라클 저장 프로시저 사용간 문의 sniperjj2003 2022-11-28 267

 
 
.NET과 Java 동영상 기반의 교육사이트

로딩 중입니다...

서버 프레임워크 지원 : NeoDEEX
based on ASP.NET 3.5
Creative Commons License
{5}
{2} 읽음   :{3} ({4})