Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> executeArrayUpdate method
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;try{
// Creating the SQL statement
string sqlStmt = "INSERT INTO table (col1) VALUES (:x)"; stmt=conn->createStatement (sqlStmt);
// 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;
***********************************************************************- ********************************************************/
(*) 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:
Thanks
-- Posted via http://dbforums.comReceived on Fri Dec 06 2002 - 10:29:35 CST