Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problems Binding Arrays in OCI
I've been working on this for a while to no avail. This is a rough
outline of the code snippet I'm using...
char* mySQL = "BEGIN; FORALL j..1 INSERT INTO MYTABLE (col) VALUES (:col1(j)); END;"
double myValues[1];
myValues[0] = 1;
/* prepare statement */
rc = OCIBindByName(hstmt, &bndp, mErrhp,
(text *)":col1", strlen("col1"), (ub1 *)&myValues, sizeof(double), SQLT_FLT, pIndicator, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0,OCI_DEFAULT); rc = OCIBindArrayOfStruct( bndp, mErrhp, (ub4) sizeof(double),
(ub4) 0, (ub4) 0, (ub4) 0 );
/* execute statement */
The binds return success, and the bind by name works fine for a single value, but when I execute this for an array, I get the following error:
Error - ORA-06550: line 1, column 53:
PLS-00382: expression is of wrong type
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
Any ideas?
Thanks,
Shawn
Received on Mon Jun 16 2003 - 20:27:28 CDT
![]() |
![]() |