FORALL using OCIBindArrayOfStruct()
I'm getting an error when attempting to use a FORALL statement with a bind to an array.
For example, the SQL I have:
BEGIN
FORALL j IN 1..2
INSERT INTO salary(userid) VALUES (:userid(j));
END;
And :userid is dynamically binded to an array of ints using OCIBindByName() and OCIBindArrayOfStruct().
OCIBindByName(pCursor->GetHStmt(), &bndp, mErrhp,
(text*) ":userid", strlen(":userid"), (dvoid *) pVar,
skip, SQLT_INT, (dvoid *) 0, (ub2 *) alenp, (ub2 *) 0, (ub4) 0,
(ub4 *) 0, OCI_DEFAULT);
OCIBindArrayOfStruct(bndp, mErrhp, skip, 0, (ub4) 2, 0);
When I run the app, I get the following error:
error message = ORA-06550: line 1, column 24:
PLS-00435: DML statement without BULK In-BIND cannot be used
inside FORALL
I'm using Oracle 9i and the project is using C++.
Any ideas?!?!
Thanks!