Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> executeArrayUpdate method

executeArrayUpdate method

From: Cuervo <member_at_dbforums.com>
Date: Fri, 06 Dec 2002 16:29:35 +0000
Message-ID: <2133577.1039192175@dbforums.com>

Hi.

I just learning about the OCCI and executing the executeArrayUpdate method within I have a problem. Here is a copy of the code that I was probing ( only the function for the executeArray method without main). The returnData array is precharged with data ( 280000 rows).

/ *********************************************************************-
***************************************

#define LEN 300000

// Array containing the data
char returnData [LEN][136];

// Indicator
ub2 returnDataLen[LEN];

void insertBind ()
  {

// Setting the indicator

        for (int i = 0; i<LEN; i++)
                returnDataLen = strlen(returnData) + 1;


// Creating the SQL statement
string sqlStmt = "INSERT INTO table (col1) VALUES (:x)"; stmt=conn->createStatement (sqlStmt);
    try{

// Setting the data buffer

        stmt->setDataBuffer(1, returnData, OCCI_SQLT_STR,
        sizeof(returnData[0]), (unsigned short *)&returnDataLen);


// Executing the array update method
stmt->executeArrayUpdate(280000); (*)

    cout << "insert - Success" << endl;

    }catch(SQLException ex)
    {

     cout<<"Exception thrown for insertBind"<<endl;
     cout<<"Error number: "<<  ex.getErrorCode() << endl;
     cout<<ex.getMessage() << endl;

   }
    conn->terminateStatement (stmt);
  }
***********************************************************************-
********************************************************/

(*) When I execute this method I canīt set the number or rows to inset greather tan 65534 rows. If I set a bigger number the error message is:

Exception thrown for insertBind
Error number: 24381
ORA-24381: error(s) in array DML

I want to know:

  1. If there any limitation for the number of rows to be insert using the executeArrayUpdate method ?
  2. If it has that limit, how can I do to inset in my table a lot of rows from an array in one round-trip ?

Thanks

--
Posted via http://dbforums.com
Received on Fri Dec 06 2002 - 10:29:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US