Wrong number of parameters error

We are using jpub and sqlj in Solaris to generate Java Classes for our app.
We also have a set of .sql scripts which in effect clone a schema.
When we run jpub/sqlj against packages in the original schema, everything is fine, but against the clone, while jpub creates sqlj code which is identical to that from the first schema, sqlj complains (when on-line checking is turned on):
A: "JDBC: reports more than one return value for <function name>" and advises that we update our driver;
B:"Did not find <func name> with <n> arguments. found <func name> with <n + a bunch> of arguments" and tells us to check the call.
We have no idea what might be causing this, and when we turn off the on-line checking for sqlj, everything appears to work fine.
Any ideas/suggestions ?

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by SQLJ Development ([email protected]):
Mmmh. This may be a bug in the way SQLJ resolves functions/stored procedures. Could you send me your infile/.sql/.sqlj files so that I can reproduce your problem? Thanks!
In the meantime, if everything works at runtime, you may have to ignore the errors and do your final compile offline.<HR></BLOCKQUOTE>
I haven't forgotten. We've got a lot of code, and will try to boil down to an illustrative example when we can.
At the moment, an off-line compile seems to work - though you might want to check my other post today :-)
null

Similar Messages

  • Why 'wrong number of parameters' error in this call to a stored procedure?

    A stored procedure exists that inserts a new record and returns the newly generated record ID. This stored procedure is called from a WinForms application but at the ExecuteNonQuery time an exception is thrown indicating that the wrong number of parameters
    has been supplied. If I take out the one parameter that is marked as ParameterDirection.Output then the ExecuteNonQuery does not throw an exception.
    CREATE PROCEDURE [dbo].[API_InsertIntoManu]
    @Name nvarchar(50),
    @Description nvarchar(2000)
    AS
    SET NOCOUNT ON
    INSERT INTO Manu (
    [Name],
    [Description]
    VALUES (
    @Name,
    @Description
    SELECT SCOPE_IDENTITY() As InsertedID
    END
    GO
    The C# code that calls the above SP looks like this:
    using (SqlConnection conn = new SqlConnection( "<snipped>" ))
    using (SqlCommand cmd = new SqlCommand( "[dbo].[API_InsertIntoManu]", conn ))
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add( Name, SqlDbType.NVarChar, 50 ).Value = "some name";
    cmd.Parameters.Add( Title, SqlDbType.NVarChar, 200 ).Value = "some title";
    // This parameter is supposed to receive the new row's ID but instead triggers a 'wrong number of args' exception.
    cmd.Parameters.Add( "InsertedID",SqlDbType.Int ).Direction = ParameterDirection.Output;
    conn.Open();
    // This is where the exception gets thrown.
    cmd.ExecuteNonQuery();
    iReturn = (int)cmd.Parameters[InsertedID].Value;
    Richard Lewis Haggard

    In you sp the size of Title var is 2000 and not 200, correct this:
    cmd.Parameters.Add( "@Title", SqlDbType.NVarChar, 200 ).Value
    Fouad Roumieh

  • Exception has occurred during data insertion ... Wrong number of parameters

    I am using an ADO dataflow source and an ADO dataflow destination to move data from a table on an IBM iSeries DB2 database to another IBM iSeries DB2 database on another machine.  The connection managers for source and destination both use .Net Providers\Odbc
    Data Provider with the Data Source Specification being ODBC connections specified on the Windows Server 2008 r2 machine hosting bids.  All the test connections work...so far so good.
    Issue is when I execute the control flow task the rows get picked up from the source DB2 database no problem but it fails on the insert to the destination DB2 table...The progress tab specifies the exceptions...
    [ADO NET Destination [601]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [07002] [IBM][System i Access ODBC Driver]Wrong number of parameters.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "ADO NET Destination" (601) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (604). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the
    failure.
    I put a data viewer on the data flow connection and the records I expect are  getting picked up and look ok. I checked to make sure the source and destination tables have the same number of columns in their record layout and identical data
    types and they look fine.
    Could someone kindly tell me whats going wrong?  Does the error message indicate that some of the columns are getting dropped from the dataset before the insert?
    Thanks much in advance for any help, Roscoe

    Hi Roscoe,
    Glad to hear that you have found the root cause. So, the issue occurs because numeric values with no decimal cannot be inserted into the Decimal data type column in the DB2 table. In SSIS, data type Decimal of DB2 database is mapped to data type DT_NUMERIC.
    To address the issue, you can do a data conversion for the column in question to define its precision and scale such as DT_NUMERIC(9,2) by using the Data Conversion Transformation before the ADO NET Destination.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Wrong number of parameters exception when using PreparedStatement

    Hi,
    I'm getting Wrong number of parameters exception when using a prepared statement. It's very weird. The code is:
    sqlstmt="update blah1 set blah2=? where blah3=?";
    myps = Conn.prepareStatement(sqlstmt);
    myps.setString(1, p1);
    myps.setInt(2, p2);
    myps.executeUpdate(sqlstmt);
    The error is:
    SQLException: [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001:07001
    Could someone please help? Thanks
    Mahdad

    Hi and thanks for the reply.
    Actually this is the try block...
    The variable's defintions are correct.
    PreparedStatement myps;
    try {
    sqlstmt="update blah1 set blah2=? where blah3=?";
    myps = Conn.prepareStatement(sqlstmt);
    myps.setString(1, blah4);
    myps.setInt(2, blah5);
    myps.executeUpdate(sqlstmt);
    catch (SQLException e) {
    System.out.println("SQLException: " + e.getMessage() + ":" + e.getSQLState());
    blah6++;

  • Wrong number of parameters

    Whats wrong with this code?
         public void updateProduct(String id, String name, String description, String cost){
              Connection conn = null;
              DataSourceManager dataSource = new DataSourceManager();
              conn = dataSource.getConnection();
              PreparedStatement stmt;
              try {
                   String updateString = "UPDATE PRODUCT SET PRODUCT_NAME = ?, DESCRIPTION = ?, COST = ? WHERE PRODUCT_ID LIKE ?";
                   stmt = conn.prepareStatement(updateString);
                   stmt.setString(1, name);
                   stmt.setString(2, description);
                   stmt.setDouble(3, Double.parseDouble(cost));
                   stmt.setString(4, id);
                   stmt.executeUpdate(updateString);
                   conn.commit();
              } catch (SQLException sqle) {
                   sqle.printStackTrace();
    I get:
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:256)
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:193)
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:444)
         at COM.ibm.db2.jdbc.app.DB2Statement.execute2(DB2Statement.java:435)
         at COM.ibm.db2.jdbc.app.DB2Statement.executeUpdate(DB2Statement.java:381)
         at com.ibm.ejs.cm.cache.CachedStatement.executeUpdate(CachedStatement.java:132)
         at com.ibm.ejs.cm.proxy.StatementProxy.executeUpdate(StatementProxy.java:190)
         at com.bright.coffeeplease.persistence.ProductPersister.updateProduct(ProductPersister.java:114)
         at com.bright.coffeeplease.product.UpdateProductServlet.doGet(UpdateProductServlet.java:24)
         at com.bright.coffeeplease.product.UpdateProductServlet.doPost(UpdateProductServlet.java:12)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
         at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
         at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
         at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
         at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:403)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:227)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:98)
         at com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:267)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
         at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
         at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
         at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
         at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:403)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:227)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:98)
         at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
         at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
         at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
         at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
         at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
         at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
         at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

    You don't want to call
    stmt.executeUpdate(updateString)
    You just want to call executeUpdate() - the prepared statement already knows what you're trying to do.
    Hope this helps.
    Incidentally, did you really mean "... WHERE PRODUCT_ID LIKE ?" rather than "... WHERE PRODUCT_ID = ?"

  • Wrong number or types error

    I am trying to connect to a stored procedure. The arguments are defined as NUMBER, VARCHAR2, and DATE.
    Here is the call I am making:
    stmt = con.prepareCall("{ call procedure(?, ?, ?) }");
              stmt.registerOutParameter(1, Types.INTEGER);
              stmt.registerOutParameter(2, Types.VARCHAR);
              stmt.registerOutParameter(3, Types.DATE);
    I have defined param 1 as int, param 2 as String, and param 3 as java.sql.Date
    Any ideas as to why the error has the wrong number or types? I am sure there are only three paramaters. I am not sure if I have defined the java types correctly. The return should echo the input. This is only a test to connect to a new client and I cannot figure out what I am doing wrong.

    The db is oracle 9i.

  • Wrong Number Of Parameters For A Method

    Exactly like the title. If I pass in too many or too few parameters in a method, am I allowed to add a customized error message?
    JW, Thanks.

    It's not possible to pass in too many or too few characters. The compiler would prevent it, and generate its own error message.
    I suppose you could do something like this if you were using varargs....but why bother?

  • Getting error wrong number or type of parameters for EAM_PROCESS_WO_PUB

    Hi All,
    I am Getting error wrong number or type of parameters for EAM_WO_PROCESS_PUB.PROCESS_WO API, pls any body can help me,pls send code for
    EAM_WO_PROCESS_PUB.PROCESS_WO API.
    Thanks&Reagrds,
    Hanimi Reddy.

    Hi srini,
    I developed code for work order api EAM_PROCESS_WO_PUB.PROCESS_MASTER_CHILD_WO following and i am getting error wrong number or types of arguments in call to 'PROCESS_MASTER_CHILD_WO, pls see the code and help me
    CREATE OR REPLACE PROCEDURE SANG_WR_TO_WO_API/*(ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2)*/ IS
    v_created_by number;
    v_updated_by number;
    v_updated_name varchar2(30);
    V_ENTITY_ID VARCHAR2(30);
    l_EAM_WO_RELATIONS_TBL EAM_PROCESS_WO_PUB.EAM_WO_RELATIONS_TBL_type ;
    --:= EAM_PROCESS_WO_PUB.g_miss_EAM_WO_RELATIONS_rec;
    l_eam_wo_tbl EAM_PROCESS_WO_PUB.eam_wo_rec_type; --:= EAM_PROCESS_WO_PUB.G_MISS_EAM_WO_rec;
    l_eam_op_tbl EAM_PROCESS_WO_PUB.eam_op_tbl_type ;--:= EAM_PROCESS_WO_PUB.G_MISS_eam_op_tbl;
    l_eam_op_network_tbl EAM_PROCESS_WO_PUB.eam_op_network_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_op_network_tbl;
    l_eam_res_tbl EAM_PROCESS_WO_PUB.eam_res_tbl_type;--:= EAM_PROCESS_WO_PUB.G_MISS_eam_res_tbl;
    l_eam_res_inst_tbl EAM_PROCESS_WO_PUB.eam_res_inst_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_res_inst_tbl;
    l_eam_sub_res_tbl EAM_PROCESS_WO_PUB.eam_sub_res_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_sub_res_tbl ;
    -- l_eam_res_usage_tbl EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type := EAM_PROCESS_WO_PUB.G_MISS_eam_res_usage_tbl;
    l_eam_mat_req_tbl EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_mat_req_tbl ;
    l_eam_direct_items_tbl EAM_PROCESS_WO_PUB.eam_direct_items_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_direct_items_tbl ;
    l_x_eam_wo_tbl EAM_PROCESS_WO_PUB.eam_wo_rec_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_wo_rec;
    l__x_EAM_WO_RELATIONS_TBL EAM_PROCESS_WO_PUB.EAM_WO_RELATIONS_TBL_type ;--:= EAM_PROCESS_WO_PUB.g_miss_EAM_WO_RELATIONS_TBL;
    l_x_eam_op_tbl EAM_PROCESS_WO_PUB.eam_op_rec_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_op_rec ;
    l_x_eam_op_network_tbl EAM_PROCESS_WO_PUB.eam_op_network_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_op_network_tbl;
    l_x_eam_res_tbl EAM_PROCESS_WO_PUB.eam_res_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_res_tbl;
    l_x_eam_res_inst_tbl EAM_PROCESS_WO_PUB.eam_res_inst_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_res_inst_tbl ;
    l_x_eam_sub_res_tbl EAM_PROCESS_WO_PUB.eam_sub_res_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_sub_res_tbl;
    -- l_x_eam_res_usage_tbl EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type := EAM_PROCESS_WO_PUB.G_MISS_eam_res_usage_tbl ;
    l_x_eam_mat_req_tbl EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_mat_req_tbl;
    l_x_eam_direct_items_tbl EAM_PROCESS_WO_PUB.eam_direct_items_tbl_type; --:= EAM_PROCESS_WO_PUB.G_MISS_eam_direct_items_tbl ;
    l_x_return_status VARCHAR2(30);
    l_x_msg_count NUMBER;
    l_x_debug VARCHAR2(30);
    l_output_dir VARCHAR2(30);
    l_debug_filename VARCHAR2(30) ;
    l_debug_file_mode VARCHAR2(30) ;
    CURSOR CUR_WTW IS
    SELECT
    EWR.WIP_ENTITY_ID
    ,EWR.WIP_ENTITY_NAME
    ,EWR.ORGANIZATION_ID
    ,WAC.ORGANIZATION_CODE
    ,EWR.DESCRIPTION
    ,EWR.ASSET_GROUP_ID
    ,EWR.ASSET_NUMBER
    ,EWR.ASSET_NUMBER_DESCRIPTION
    ,WAC.ACCOUNTING_CLASS
    ,WAC.MATERIAL_ACCOUNT
    ,WAC.MATERIAL_OVERHEAD_ACCOUNT
    ,WAC.RESOURCE_ACCOUNT
    ,WAC.OUTSIDE_PROCESSING_ACCOUNT
    ,WAC.MATERIAL_VARIANCE_ACCOUNT
    ,WAC.RESOURCE_VARIANCE_ACCOUNT
    ,WAC.OUTSIDE_PROC_VARIANCE_ACCOUNT
    ,WAC.STD_COST_ADJUSTMENT_ACCOUNT
    ,WAC.OVERHEAD_ACCOUNT
    ,WAC.OVERHEAD_VARIANCE_ACCOUNT
    ,EWR.WORK_REQUEST_OWNING_DEPT_ID
    ,EWR.WORK_REQUEST_OWNING_DEPT
    ,EWR.WORK_REQUEST_PRIORITY_ID
    ,EWR.WORK_REQUEST_PRIORITY
    ,EWR.WORK_REQUEST_STATUS_ID
    ,WAC.ORGANIZATION_NAME
    FROM
    WIP_EAM_WORK_REQUESTS_V EWR
    ,WIPFV_ACCOUNTING_CLASSES WAC
    ,WIP_EAM_PARAMETERS WAP
    WHERE
    EWR.ORGANIZATION_ID = WAC.ORGANIZATION_ID
    AND WAC.ORGANIZATION_ID = WAP.ORGANIZATION_ID
    AND WAC.ACCOUNTING_CLASS = WAP.DEFAULT_EAM_CLASS
    AND EWR.WORK_REQUEST_STATUS = 'Awaiting Work Order';
    BEGIN
    --i number := 1;
    FND_GLOBAL.apps_initialize (1001255, 50326, 700, 0);
    V_CREATED_BY := FND_GLOBAL.USER_ID;
    V_UPDATED_BY := FND_GLOBAL.USER_ID;
    v_updated_name := FND_GLOBAL.USER_name;
    for rec in cur_wtw loop
    l_eam_wo_tbl.WIP_ENTITY_ID := rec.wip_entity_id;
    l_eam_wo_tbl.ORGANIZATION_ID := rec.ORGANIZATION_ID ;
    l_eam_wo_tbl.ASSET_NUMBER := rec.ASSET_NUMBER;
    l_eam_wo_tbl.ASSET_GROUP_ID := rec.ASSET_GROUP_ID ;
    l_eam_wo_tbl.DESCRIPTION := rec.DESCRIPTION ;
    --SELECT WIP_ENTITIES_S.NEXTval INTO V_ENTITY_ID FROM DUAL;
    EAM_PROCESS_WO_PUB.PROCESS_MASTER_CHILD_WO
    (P_PO_IDENTIFIER => 'EAM'
    ,P_API_VERSION_NUMBER => 1.0
    ,P_INIT_MSG_LIST => FALSE
    ,P_EAM_WO_RELATIONS_TBL => l_EAM_WO_RELATIONS_TBL
    ,P_EAM_WO_tbl => l_eam_wo_tbl
    , p_eam_op_tbl => l_eam_op_tbl
    , p_eam_op_network_tbl => l_eam_op_network_tbl
    , p_eam_res_tbl => l_eam_res_tbl
    , p_eam_res_inst_tbl => l_eam_res_inst_tbl
    , p_eam_sub_res_tbl => l_eam_sub_res_tbl
    --, p_eam_res_usage_tbl => l_eam_res_usage_tbl
    , p_eam_mat_req_tbl => l_eam_mat_req_tbl
    , p_eam_direct_items_tbl => l_eam_direct_items_tbl
    , x_eam_wo_tbl => l_x_eam_wo_tbl
    , X_EAM_WO_RELATIONS_TBL => l__x_EAM_WO_RELATIONS_TBL
    , x_eam_op_tbl => l_x_eam_op_tbl
    , x_eam_op_network_tbl => l_x_eam_op_network_tbl
    , x_eam_res_tbl => l_x_eam_res_tbl
    , x_eam_res_inst_tbl => l_x_eam_res_inst_tbl
    , x_eam_sub_res_tbl => l_x_eam_sub_res_tbl
    -- , x_eam_res_usage_tbl =>l_x_eam_res_usage_tbl
    , x_eam_mat_req_tbl => l_x_eam_mat_req_tbl
    , x_eam_direct_items_tbl => l_x_eam_direct_items_tbl
    , x_return_status => l_x_return_status
    , x_msg_count => l_x_msg_count
    ,p_commit =>'N'
    , p_debug => 'N'
    , p_output_dir => NULL
    , p_debug_filename => 'EAM_WO_DEBUG.log'
    , p_debug_file_mode => 'w'
    END LOOP;
    END SANG_WR_TO_WO_API;
    COMMIT;
    Thanks ,
    Hanimi

  • Wrong number or types of parameters after upgrading to ODP 11.2.0.1.1 Beta

    Hi,
    I have the below Oracle procedure with two parameters , the first one i IS TABLE OF number INDEX BY BINARY_INTEGER, and the second one is of type Ref cursor of predifned RECORD type.
    PROCEDURE Proc1(p_proj_comp_no_list IN core_util.ref_t,
    p_proj_comp_post_query_cursor OUT t_proj_comp_post_query_cursor
    ) IS
    This has been working fine while we were using DEVART Oracle drivers. however, as soon we move to ODP 11.2.0.1.1 Beta version we get the below error while executing the procedure via ODP.
    {"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'PROJ_COMP_POST_QUERY'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"}
    Below is the debug watch result of the two parameters of the COMMAND being executed.
    Best Regards,
    Prabhakar
    +          *base     {P_PROJ_COMP_NO_LIST}     System.Data.Common.DbParameter {Oracle.DataAccess.Client.OracleParameter}*
              ArrayBindSize     null     int[]
              ArrayBindStatus     null     Oracle.DataAccess.Client.OracleParameterStatus[]
              CollectionType     None     Oracle.DataAccess.Client.OracleCollectionType
              DbType     String     System.Data.DbType
              Direction     Input     System.Data.ParameterDirection
              IsNullable     false     bool
              Offset     0     int
              OracleDbType     Long     Oracle.DataAccess.Client.OracleDbType
              OracleDbTypeEx     Long     Oracle.DataAccess.Client.OracleDbType
              ParameterName     "P_PROJ_COMP_NO_LIST"     string
              Precision     0     byte
              Scale     0     byte
              Size     1     int
              SourceColumn     ""     string
              SourceColumnNullMapping     false     bool
              SourceVersion     Current     System.Data.DataRowVersion
              Status     Success     Oracle.DataAccess.Client.OracleParameterStatus
              UdtTypeName     ""     string
    +          Value     {long[1]}     object {long[]}
    +          Static members          
    +          Non-Public members          
    -          [1]     {P_PROJ_COMP_POST_QUERY_CURSOR}     object {Oracle.DataAccess.Client.OracleParameter}
    +          *base     {P_PROJ_COMP_POST_QUERY_CURSOR}     System.Data.Common.DbParameter {Oracle.DataAccess.Client.OracleParameter}*
              ArrayBindSize     null     int[]
              ArrayBindStatus     null     Oracle.DataAccess.Client.OracleParameterStatus[]
              CollectionType     None     Oracle.DataAccess.Client.OracleCollectionType
              DbType     Object     System.Data.DbType
              Direction     Output     System.Data.ParameterDirection
              IsNullable     false     bool
              Offset     0     int
              OracleDbType     RefCursor     Oracle.DataAccess.Client.OracleDbType
              OracleDbTypeEx     RefCursor     Oracle.DataAccess.Client.OracleDbType
              ParameterName     "P_PROJ_COMP_POST_QUERY_CURSOR"     string
              Precision     0     byte
              Scale     0     byte
              Size     0     int
              SourceColumn     ""     string
              SourceColumnNullMapping     false     bool
              SourceVersion     Current     System.Data.DataRowVersion
              Status     Success     Oracle.DataAccess.Client.OracleParameterStatus
              UdtTypeName     ""     string
    +          Value     {}     object {System.DBNull}
    +          Static members          
    +          Non-Public members

    Hi,
    Can you please show the actual code that creates and appends the parameters instead, along with cmd.commandtext?
    Thanks
    Greg
    Edited by: gdarling on Jun 30, 2010 11:54 AM
    Also note that unless you're using Oracle Developer Tools for VS to generate the code, this would probably be more appropriate in the ODP forum:
    ODP.NET

  • Error running a procedure in Python: (wrong number or types of arguments)

    I am getting the following error when trying o execute a stored procedure in python.
    cx_Oracle.DatabaseError: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'LOAD_FILE1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    When executed from the SQL Plus or sql developer the same procedure runs without any issue. The following is the code of the called procedure:
    create or replace
    PROCEDURE load_file1 (
    P_FILE_NAME in varchar2)* IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('inbox_scnr_dir', P_FILE_NAME);
    -- insert a NULL record to lock
    the above procedure updates creates and updates a record in the table.
    I am calling the above procedure as follows in my python code , see the curs.callproc("load_file1",osfile)
    for filename in files:
    osfile = doc_number(filename)
    curs.callproc("load_file1",osfile)+
    db.commit()
    As you can see I am giving only one argument and the type is string as well, it passes the filename like 'abx.txt' to the procedure. So I am not wrong there.
    Am I calling it in a wrong way or the cx_Oracle have some limitation about procedure callings.
    Can the gurus on the forum help me please. Just need a direction to resolve this , if you can guide me.
    Thanks
    Edited by: user10903866 on Feb 28, 2013 5:54 AM
    Edited by: user10903866 on Feb 28, 2013 6:45 AM

    CREATE OR REPLACE
    PACKAGE TESTER AS
    TYPE t_ref_cur IS REF CURSOR;
    PROCEDURE getRS (p_recordset OUT t_ref_cur);
    END;
    CREATE OR REPLACE
    PACKAGE BODY TESTER AS
    PROCEDURE getRS (p_recordset OUT t_ref_cur) AS
    BEGIN
    OPEN p_recordset FOR
    SELECT
    name,
    value
    FROM
    Parameters;
    END;
    END;For this type of procedure call, you should first have the ref cursor declaration like below
    declare
    cur tester.t_ref_cur;
    begin
    tester.getRS (cur);
    for i in cur
    loop
    dbms_output.put_line(i.name);
    end loop;
    close cur;
    end;Using sys_refcursor also, your handling will be same as shown above......sys_refcursor and normal weak ref cursor only make difference if it is stand alone procedure

  • Error : PLS-00306: wrong number or types of arguments

    Hi,
    I have created a function :
    create or replace procedure Test11 AS
    x Test.Emp_No%Type;
    Begin
    select emp_no into x from Test where name = 'Sud';
    x := x + 1;
    update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;
    This has compiled successfully in PL/SQL Developer. Now, I have created an executable of this procedure in Front end - 11i. And then I have created a Program of this executable. Then I have added this program to a request group.
    Now that I am running this request and I getting this error in the log :
    ORACLE error 6550 in FDPSTP
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST11'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    .

    Hi,
    Your procedure is a little confusing. By the way, this procedure has no parameters and I supose that maybe you are calling it with some parameter. Could you check this please?
    Tip: post your code inside tags (start and end tag are the same) to proper formatting :)
    Regards,
    Edited by: Walter Fernández on Dec 3, 2008 10:53 AM - Adding tip...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error PLS-00306: wrong number or types of arguments in call to

    I am getting the following Error when calling stored Procedure, I have tried with Last Parameter PRESULT and WITHOUT IT, it fails in both the instance.
    =======================================================================
    "System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'UPDATECOTRACKING'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    =======================================================================
    signature of Stored Procedure is as follow
    (pmaster_key IN sca_costtrackinglog.master_key%type,
         pdoc_master_key IN sca_costtrackinglog.master_key%type,     
    pfrenumber IN sca_costtrackinglog.fre_number%type,     
    pnotice1 IN sca_costtrackinglog.notice1%type,
    pnotice2 IN sca_costtrackinglog.notice2%type,
    padditreceived IN sca_costtrackinglog.additreceived%type,
    pfreanticipate IN sca_costtrackinglog.freanticipate%type,
    pdateofnot IN sca_costtrackinglog.dateofnot%type,
    pdateofmeeting IN sca_costtrackinglog.dateofmeeting%type,
    psenttocontractor IN sca_costtrackinglog.senttocontractor%type,
    pcouforexecution IN sca_costtrackinglog.couforexecution%type,
    pcomments IN sca_costtrackinglog.comments%type,
    pcreateby IN sca_costtrackinglog.createby%type,
    peditby IN sca_costtrackinglog.editby%type,
         presult OUT number) is
    This is the Trace of Parameters from actual Call, that fails with above error.
    Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(26), Value = 000328JYA30008HSWBCK01NYC
    Parameter Name : pdoc_master_key(Input),Type(AnsiString) Size(26), Value = 310657KLF30025HSWBCK01NYC
    Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(12), Value = 00015
    Parameter Name : PNOTICE1(Input),Type(DateTime) Size(1), Value = 3/25/2010
    Parameter Name : PNOTICE2(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(1), Value =
    Parameter Name : pcouforexecution(Input),Type(DateTime) Size(1), Value =
    Parameter Name : pcomments(Input),Type(AnsiString) Size(250), Value =
    Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
    Parameter Name : PEDITBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Below is the trace from Data.OracleClient.OracleCommandBuilder.DeriveParameters(Cmd)
    Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PDOC_MASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PNOTICE1(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PNOTICE2(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PCOUFOREXECUTION(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PCOMMENTS(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PEDITBY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PRESULT(Output),Type(VarNumeric) Size(0), Value =
    ******************************************************************************************************************

    In the Oracle database, the body of the package FWA_PRI API, the procedure ValidatePri declares P_PriREc as being :
    PAYMENT_REQUEST_IMPORT%ROWTYPE
    As you can see above, the DoPri Procedure expects a type p_PriRec as its second argument.
    Therefore in my procedure I do the following:
    create or replace procedure spMatchPayment is
    BEGIN
    DECLARE
           CURSOR StageCurs IS SELECT * FROM PAYMENT_REQUEST_IMPORT;
                  p_payment_req_import PAYMENT_REQUEST_IMPORT%ROWTYPE;
                  BEGIN
                       OPEN StageCurs();
                            LOOP
                                FETCH StageCurs INTO P_payment_req_import;
                                EXIT WHEN StageCurs%NOTFOUND;
                                fwa_pri.DoPri(NULL, fwa_pri.DoPri('M',P_PriRec => p_payment_req_import);                           
                             END LOOP;
                        CLOSE StageCurs;
                   END;
    end spMatchPayment;
    Now, when I am trying to compile I am getting the Compilation errors for PROCEDURE IMPACT.SPMATCHPAYMENT
    Error: PLS-00306: wrong number or types of arguments in call to 'DOPRI'
    Line: 16
    Text: fwa_pri.DoPri(NULL,P_PriRec => p_payment_req_import);
    I don't see what's wrong on my code......HELP!!

  • PLSQL Concurrent error: wrong number or types of arguments in call

    Hi there,
    I've defined a PLSQL Concurrent with 2 parameters:
    10) DELIVERABLE_ID using valueset 10/Number (A 10 digit positive number field with no validation)
    20) STATUS using valueset 10 Characters (10 Characters free text with no validation)
    My request run into error, with parameter values DELIVERABLE_ID = 105367,STATUS=New
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EBOARD_WF_START'
    ORA-06550: line 1, column 7:
    But I ran the the same PLSQL from toad
    ADB_PA_BC_WF.EBOARD_WF_START (105367,'New');
    I dont have any error, it completed successfully.
    Any clue what gone wrong?

    You need to define package / procedure with RETCODE and ERRBUF arguments to call as concurrent program.
    procedure my_cp
    ( errbuf out varchar2,
    retcode out varchar2,
    p_arg1 in varchar2,
    p_arg2 in varchar2
    Regards,
    Gareth

  • SSRS Calling a Stored Procedure error : PLS-00306: wrong number or types of arg...

    Hi,
    My Problem is when im adding dataset with stored procedure, im getting this error.
    I Can access database, 
    Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_NAME' ORA-06550: line 1, column 7: PL/SQL:
    Statement ignored
    stored procedure is simple select :
    CREATE OR REPLACE PROCEDURE [PROCEDURE_NAME](L_CURSOR out SYS_REFCURSOR)
    is
    Begin
    open L_CURSOR for
    SELECT [columnname] FROM
    [tablename]
    End;
    Configuration Details:
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biOracle Developer Tools for Visual Studio Copyright (c) 2005,2014 SQL Server Data Tools Type: Oracle , Data Provider : .Net Framework Data Provider For Oracle

    The answer is of inside question. It is about provider. Change my provider ODTwithODAC for 10g (my database version). And problem resolved.
    Thank you for your helps,
    Regards,
    Arda

  • Error executing CFC. Parameter index out of range (2 number of parameters, which is 1)

    Hi,
    My CFC component is defined as:
    <cffunction name="updateNote" output="false" access="remote"  returntype="void" >
         <cfargument name="notedetails" required="true" type="string" >
         <cfargument name="notename" required="true" type="string" />
         <cfquery name="qupdateNote" datasource="notes_db">
               UPDATE
                   notes
               SET
                   notes.notedetails=<CFQUERYPARAM CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#ARGUMENTS.notedetails#">,
               WHERE
                   notename="<CFQUERYPARAM CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#ARGUMENTS.notename#">"
        </cfquery>
    </cffunction>
    In Flash builder when I test the operation I get this error:
    "There was an error while invoking the operation. Check  your server settings and try invoking the operation again.
    Reason:  Server error Unable to invoke CFC - Error Executing Database Query. Parameter  index out of range (2 > number of parameters, which is 1)."
    Im really quessing that this is something small but right now its causing me to pull my hair out of my head!! Argg. Tried a bunch of things but I know thik im stuck.
    Help would be very very appreciated.
    Thanks

    Create test.cfm along these lines:
    <cfset myObj = createObject("component", "dotted.path.to.cfc.file")>
    <cfset myResult = myObj.myMethod(arg=value1, etc)>
    <cfdump var="#myResult#">
    Or, really, you could just browse to this:
    http://your.domain/path/to/your.cfc?method=yourMethod&arg1=value1 [etc]
    Although I dunno which of those two approachs will give you a better error message (indeed, it might be the same).
    Try both.
    Adam

Maybe you are looking for

  • MDB(Message Driven Bean) is not working in MDM2.0.1

    Hi, I am trying to use MDB for importing files.I followed the Weblogic_jms_Integration(1308181.1) document and i created all the xml files CM_config.xmCM_ejb-jar.xml.wls.jms_1.includel.win.exit_4.include,CM_config.xml.win.jms.include,CM_ejb-jar.xml.w

  • Reminder mail for workflow approval

    Hi All, We have a scheduled task which sends Reminder mails for workflow approval which has been pending for more than 5 days. Recently I created new workflow definitions and reminder task stopped sending mails. I checked task and it has IapiTaskIfc

  • PR counterparts of PO structure/tables

    Hi gurus, Do you know what are the PR counterparts of these PO structure/tables? mepoheader purchase_order_items Thanks!

  • Need help wtih my own accout for itunes!

    On my computer I have a itunes program on it already it fro my sister she has 4000 songs and has a different ipod. I just got a new ipod and I need to outmy itunes on the computer without erasiung her or upgrading it. i jstu need my own account!!!

  • CS5 illustrator swatches disappeared

    All the pantone swatches have disappeared in illustrator. I have:completed all updates, reinstalled illustrator, turned all fonts off, deleted preferences, copied the preset swatch folder, restarted and zapped the PRAM. I don't know what else to do t