Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to import a file , but while calling the procedure i get an exception ORA-20001: Invalid Operation.

Stored Procedure:

begin
  -- Call the procedure
  imp_pkg.isinmstimp(cpath => :cpath,
                     cfilename => :cfilename,
                     cusername => :cusername,
                     ndp_list_id => :ndp_list_id);
end;


 if (imp_module == "m_importisin")
            {
                //Call Procedure     
                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);
                o_Cls_OracleConnect.CallStoredProcedure_Double_AddParameters("ndp_list_id", 1);
                int recordsInserted = o_Cls_OracleConnect.CallStoredProcedure("IMP_PKG.ISINMSTIMP");


                o_Cls_OracleConnect.Dispose();             
            }

On the below line I get the exception :

int recordsInserted = o_Cls_OracleConnect.CallStoredProcedure("IMP_PKG.ISINMSTIMP"); 

I have another bit of code which executes correctly, but gives an exception for Store Procedure :

value too large for column "CDSIL_MIGR"."ADDRESS"."ZIP" (actual: 11, maximum: 10)Row-no1

 if (imp_module == "m_impbankmaster")
            {
                //Call Procedure               
                try
                {
                    parameter2 = "d:\\imports";
                    parameter3 = "CD100621U.002";
                    parameter4 = "611";

                    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);
                    o_Cls_OracleConnect.CallStoredProcedure_Double_AddParameters("ndp_list_id", 1);
                    int recordsInserted = o_Cls_OracleConnect.CallStoredProcedure("IMP_PKG.BANKMSTIMP");
                    o_Cls_OracleConnect.Dispose();
                }
                catch (Exception ex)
                {
                    throw ex;
                }             
            }
share|improve this question

closed as off-topic by Mat, Paul White, RolandoMySQLDBA, Phil, Max Vernon Oct 8 '13 at 22:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Mat, Phil
If this question can be reworded to fit the rules in the help center, please edit the question.

4  
What part of "Store Procedure : value too large for column "CDSIL_MIGR"."ADDRESS"."ZIP" (actual: 11, maximum: 10)Row-no1" don't you understand? –  Colin 't Hart Oct 8 '13 at 10:40
    
OracleConnect.CallStoredProcedure doesn't look like something Oracle provides, so you should contact the author or vendor of that software to assist you in troubleshooting their code. –  mustaccio Oct 8 '13 at 11:48
    
For problems with your client libraries, you should ask on Stackoverflow and tag for your library and language. –  Colin 't Hart Oct 8 '13 at 11:54

1 Answer 1

ORA-20001: Invalid Operation.

This means you had some error, unfortunately either the procedure is not returning the full error stack to you, or your code is unable to display it. If you see the error stack, it will tell you which line the exception was raised on, then you can infer what the error could be. If this is all the code is returning to you, then it probably needs to be modified to return a better error message with useful information. Another way to try might be to call this procedure using sqlplus, with same parameters and then you will be able to see the error stack, which will be useful for debugging.

value too large for column "CDSIL_MIGR"."ADDRESS"."ZIP" (actual: 11, maximum: 10)Row-no1

You seem to have a data issue, code is trying to insert/update 11 characters into ZIP column whose max size is 10 characters (perhaps on row number 1?). If you fix your bad data, you should be good to go. Since the procedure you are calling has a EXCEPTION block, it is actually suppressing actual error ORA-12899.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.