Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

example of asp classic using msdaora calling oracle 10g stored proc?

user521233Dec 13 2008 — edited Dec 19 2008
i just migrated a sql server application to oracle using sql developer workbench. i am having immediate problems of course...

this example asp code and oracle procedure first complains of wrong number and type of arguments. if i have similar code that i just remove the return parameter then it works but anything that i need an inpurt parameter for doesn't work.

any assistance most appreciated!

set sp_portfolio = Server.CreateObject("ADODB.Command")
sp_portfolio.ActiveConnection = MM_MHR_CONN_STR_STRING
sp_portfolio.CommandType = 4
sp_portfolio.CommandTimeout = 0
sp_portfolio.Prepared = true
sp_portfolio.CommandText = "PMS.Sp_HPMSQ003_Get_Portfolio"
sp_portfolio.Parameters.Append sp_portfolio.CreateParameter("IP_PMSPF_ID", 200, 1,10,sp_portfolio__P_PMSPF_ID)
sp_portfolio.Parameters.Append sp_portfolio.CreateParameter("rs", 200, 2, 10000)
set rst_Portfolio = sp_portfolio.Execute

CREATE OR REPLACE PROCEDURE "SP_HPMSQ005_GET_PROJECTS"
(
v_P_PMSPF_ID IN NUMBER DEFAULT NULL ,
v_P_START_DT IN varchar2 DEFAULT NULL ,
cv_1 IN OUT SYS_REFCURSOR
)
AS
BEGIN

OPEN cv_1 FOR
select P.*, TO_CHAR(PMSPT_PLND_REL_DT, 'YYYY') || ' ' || TO_CHAR(PMSPT_PLND_REL_DT, 'MM') Combodate,
TO_CHAR(PMSPT_PLND_REL_DT, 'MM') RelMnth, TO_CHAR(PMSPT_PLND_REL_DT, 'YYYY') RelYear,
S.PMSPS_IMGPTH_TXT, S.PMSPS_DESC_TXT
From TPMSPT_PROJECT P, TPMSPP_PORTFOLIO_PROJECT F, TPMSPS_PROJECT_STATUS S
Where F.PMSPF_ID = v_P_PMSPF_ID
and P.PMSPT_ID = F.PMSPT_ID
and S.PMSPS_CD = P.PMSPS_CD
and P.PMSPT_PLND_REL_DT >= TO_DATE(ltrim(rtrim(v_P_START_DT)), 'yyyy.mm.dd')
Order by P.PMSPT_PLND_REL_DT, UPPER(P.PMSPT_SNAM_TXT);

END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2009
Added on Dec 13 2008
1 comment
4,241 views