You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Joe Chandler <jo...@autodesk.com> on 2005/04/07 22:16:47 UTC
Oracle Stored Proces
What am I missing?
Trying to execute a very simple stored procedure for a proof of concept
with Oracle...
(I am using MS provider for oracle.)
I am getting the following error:
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'RAISE_IT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'RAISE_IT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The proc looks like this:
CREATE OR REPLACE PROCEDURE RAISE_IT (REQUEST_ID IN VARCHAR)
IS
BEGIN
INSERT INTO PRJ_STATUS_LUT(CODE, DISPLAY_NAME, SORT_ORDER)
VALUES('IN_PLANNING', 'In Planning', 0);
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20500,REQUEST_ID);
END;
/
The SQL Map has the following inside it:
<parameterMaps>
<parameterMap id="copyRequestDetails-params">
<parameter property="Id" column="REQUEST_ID"
dbType="VARCHAR"/>
</parameterMap>
</parameterMaps>
<procedure id="copyRequestDetails"
parameterMap="copyRequestDetails-params">
raise_it
</procedure>
The C# code is written as follows:
IDataManager mgr =
DataManagerFactory.GetInstance("ScenarioDataManager");
Hashtable hash = new Hashtable();
hash.Add("Id","SOME TEST DATA");
mapper.Update("copyRequestDetails",hash);
The error I am getting is as follows:
SQL for statement 'copyRequestDetails' :raise_it
2005-04-07 14:08:46,605 [2612] ERROR TestCases.StoredProcedureTC -
Exception: Autodesk.Consulting.Common.DataManagers.DataManagerException
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'RAISE_IT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'RAISE_IT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at
System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle
errorHandle, Int32 rc)
Joe Chandler
Technical Consultant
Autodesk, Inc.
7935 East Prentice Ave., Suite 104
Greenwood Village, CO 80111
Direct 303 256-5903
Mobile 303 960-5536
Fax 303 256-5950