We are very new to using the OCI and we are having difficulty passing an array of data to a procedure.

I have stripped down the code to hopefully make it easier, but still provide enough information. (Mostly the error checking has been removed)

I get the following error from the OCIStmtExecute() function.

OCI_ERROR - Error - ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GIVE_AN_ARRAY'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GIVE_AN_ARRAY'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Oracle Procedure definition:
---------------------------
Code:
create or replace
type arrayrouteid is varray(5000) of varchar2(6);
 
create or replace
type arrayzip is varray(5000) of varchar2(7);
 
procedure give_an_array(zip_array in arrayzip
                      ,routeid_array in arrayrouteid);
C code is as follows:
--------------------
Code:
struct TBCDataRec
{
    char szZIPCode[5+1];
    char szRouteId[4+1];
};

submit_msg_bulk(      TBCDataRec* pBuffer,
                const int         nRecCnt)
{
    //PREPARE THE SQL STATEMENT
    char     szSqlStmt[512] ={0};
    int      iSql           =0;
    sb4      nStatusCode    =0;
    OCIBind* pHndBindZIP    =0;
    OCIBind* pHndBindRteId  =0;
 
 
    //
    // BUILDING THE SQL STATEMENT TO SUBMIT THE BREADCRUMBS MESSAGE
    //
    iSql+=sprintf(&szSqlStmt[iSql],"BEGIN ");
    iSql+=sprintf(&szSqlStmt[iSql],"%s( ", m_pSysEnv->szDbFuncSubmitBc);
    iSql+=sprintf(&szSqlStmt[iSql],":ZIPBind,");
    iSql+=sprintf(&szSqlStmt[iSql],":RteIdBind");
    iSql+=sprintf(&szSqlStmt[iSql],"); ");
    iSql+=sprintf(&szSqlStmt[iSql],"END;");
 
    //
    //PREPARING THE SQL STATEMENT
    //
    Status=OCIStmtPrepare2(m_pOCIHndSvcCtx,
                           &m_pOCIHndStmtSubmit,
                           m_pOCIHndError,
                           (const OraText*)szSqlStmt,
                           strlen(szSqlStmt),
                           NULL,
                           0,
                           OCI_NTV_SYNTAX,
                           OCI_DEFAULT);
  
    //
    //BIND THE INPUT VARIABLES
    //
    Status=OCIBindByName(m_pOCIHndStmtSubmit,
                         &pHndBindZIP,
                         m_pOCIHndError,
                         (text*)":ZIPBind",
                         (sb4)strlen(":ZIPBind"),
                         pBuffer[0].szZIPCode,
                         (sword)sizeof(pBuffer[0].szZIPCode),
                         SQLT_STR,
                         (void*)0,
                         (ub2*)0,
                         (ub2)0,
                         (ub4)1000, //MAXIMUM ENTRIES IN THE ARRAY
                         (ub4*)0,
                         OCI_DEFAULT); //OCIBindByName(pHndBindZIP)
 
    Status=OCIBindByName(m_pOCIHndStmtSubmit,
                         &pHndBindRteId,
                         m_pOCIHndError,
                         (text*)":RteIdBind",
                         (sb4)strlen(":RteIdBind"),
                         pBuffer[0].szRouteId,
                         (sword)sizeof(pBuffer[0].szRouteId),
                         SQLT_STR,
                         (void*)0,
                         (ub2*)0,
                         (ub2)0,
                         (ub4)1000,//MAXIMUM ENTRIES IN THE ARRAY
                         (ub4*)0,
                         OCI_DEFAULT);//OCIBindByName(pHndBindRteId)
 
 
    //
    //PROVIDE SKIP VALUES
    //
    Status=OCIBindArrayOfStruct(pHndBindZIP,
                                m_pOCIHndError,
                                (ub4)sizeof(pBuffer[0]),
                                (ub4)0,
                                (ub4)0,
                                (ub4)0);//OCIBindArrayOfStruct(pHndBindZIP)
 
    Status=OCIBindArrayOfStruct(pHndBindRteId,
                                m_pOCIHndError,
                                (ub4)sizeof(pBuffer[0]),
                                (ub4)0,
                                (ub4)0,
                                (ub4)0);//OCIBindArrayOfStruct(pHndBindRteId)
 
    //
    //EXECUTE THE STATEMENT
    //
    Status=OCIStmtExecute(m_pOCIHndSvcCtx,
                          m_pOCIHndStmtSubmit,
                          m_pOCIHndError,
                          (ub4)nRecCnt, //NUMBER OF ELEMENTS IN THE ARRAY
                          (ub4)0,
                          (OCISnapshot*)NULL,
                          (OCISnapshot*)NULL,
                          OCI_DEFAULT);

}