I have create a Oracle stored procedure that check to see if a record exist and then returns an integer 0 or 1. I need to call and pass parameters to ths store procedure from a public Function ASP.net. Here is the Error message that I am getting returned in the ASP.net debugger: Message = "ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'RECORDEXISTS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored ". Here is my Oracle stored procedure code:
PROCEDURE recordExists(i_domain VARCHAR2 ,
i_status VARCHAR2,
i_sdtm_ig_version VARCHAR2,
recordExists OUT NUMBER)
AS
BEGIN
SELECT count(*) INTO recordExists
FROM vw_mapping_domain_ref_all
WHERE upper(domain) = upper(i_domain) AND
upper(status) = upper(i_status) AND
sdtm_ig_version = i_sdtm_ig_version;
END recordExists;
Here is my ASP.net Code:
Public Sub draftrecordExists(ByVal dom As domainRefDetails)
Dim ora As New OracleDataAccess(connectio
nString)
Dim myParams As OracleParameter()
myParams = ora.InitParameters(3)
myParams(0) = OracleDataAccess.CreateInp
utParamete
r("i_domai
n", dom.domain, OracleType.NVarChar)
myParams(1) = OracleDataAccess.CreateInp
utParamete
r("i_statu
s", dom.status, OracleType.NVarChar)
myParams(2) = OracleDataAccess.CreateInp
utParamete
r("i_sdtm_
ig_version
", dom.sdtm_ig_version, OracleType.NVarChar)
myParams(3) = OracleDataAccess.CreateOut
putParamet
er("o_reco
rdExistts"
, OracleType.Int16)
Try
ora.ExecuteStoredProc("pkg
_vw_mappin
g_domain_r
ef.RecordE
xists", myParams)
Catch ex As OracleException
End Try
End Sub
Here is the code that calls the procedure:
mynum = checkforexistrecord(DATAKE
Y1, DATAKEY2, DATAKEY3)