FORALL using OCIBindArrayOfStruct()
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 1 of 1

Thread: FORALL using OCIBindArrayOfStruct()

  1. #1
    Join Date
    Jun 2003
    Posts
    1

    Exclamation 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!
    Last edited by slau; 06-20-2003 at 02:27 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width