Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , Can anyone help me resolve above exception?
I am trying to import file and for that i have written Store Procedure , but when i call procedure it gives me above exception what is the reason and do i need to change the parameter name?


Java
if (imp_module == "m_impbankmaster")
               {
                   //Call Procedure
                   try
                   {
                       s_dsnstr = o_Cls_Utility.utl_fnGetDSNStr(SessionCheck.s_sessiondpid);
                       OracleConnect o_Cls_OracleConnect = new OracleConnect(s_dsnstr);
                       o_Cls_OracleConnect.CallStoredProcedure_PreInit();
                       o_Cls_OracleConnect.CallStoredProcedure_Varchar2_AddParameters("cPath", parameter2);
                       o_Cls_OracleConnect.CallStoredProcedure_Varchar2_AddParameters("cFilename", parameter3);
                       o_Cls_OracleConnect.CallStoredProcedure_Varchar2_AddParameters("cUserName", parameter4);
                       int recordsInserted = o_Cls_OracleConnect.CallStoredProcedure("IMP_PKG.BANKMSTIMP");
                       o_Cls_OracleConnect.Dispose();
                   }
                   catch (Exception ex)
                   {
                       throw ex;
                   }
               }



Store Procedure :

SQL
CREATE OR REPLACE PROCEDURE imp_pkg.BankMstImp(cPath VARCHAR2,cFilename VARCHAR2,cUserName VARCHAR2)

I get exception on below line.

    int recordsInserted = o_Cls_OracleConnect.CallStoredProcedure("IMP_PKG.BANKMSTIMP");
                       o_Cls_OracleConnect.Dispose();
Posted
Updated 7-Oct-13 20:08pm
v2
Comments
Madhu Nair 8-Oct-13 0:45am    
Do you have to prefix "@" character to the parameter name? I have not worked on Oracle, but in SQL Server we do so.
Member 9410081 8-Oct-13 2:23am    
no not for Store procedure calling.
Richard MacCutchan 8-Oct-13 4:07am    
Where is the code for the CallStoredProcedure method?
Shubham Choudhary 8-Oct-13 4:23am    
Hi!!!
This exception is always throw due to passing wrong value in parameter like u inserting a string data in a int value

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900