array DML inserts in 9i
From: rdharbis <randall.d.harbison_at_msfc.nasa.gov>
Date: 3 Jun 2003 08:29:23 -0700
Message-ID: <b023495a.0306030729.7925f515_at_posting.google.com>
}
OCIStmtExecute(svchp, stmthp,errhp, 3, 0, 0, 0, OCI_DEFAULT); Received on Tue Jun 03 2003 - 17:29:23 CEST
Date: 3 Jun 2003 08:29:23 -0700
Message-ID: <b023495a.0306030729.7925f515_at_posting.google.com>
I am gettting error "ORA-01858: a non-numeric character was found where a numeric was expected" when executing the following code. If I set the iteration parameter in the OCIStmtExecute() function to one, there is not a problem, but then I am not doing the multiple inserts. I know this works for others. What I am I failing to do. Is this enough information? I did have the standard error lookup code from the OCI doc but it only gave me the generic error "ORA-24381: error(s) in array DML".
<snippet follows>
OCIStmtPrepare(stmthp, errhp, insrt, strlen(insrt), (ub4)
OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
...error stuff
for(c=0;c<MAXARRAY;c++) {
OCIBindByName(stmthp, &bnd1[c], errhp, (text *) ":ONE", -1, (dvoid *) &vOne[c],
(sword) strlen(vOne[c]), SQLT_CHR, (dvoid *) 0,
(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0,
OCI_DEFAULT); ...error stuff OCIBindByName(stmthp, &bnd2[c], errhp, (text *) ":TWO", -1, (dvoid *) &vTwo[c],
(sword) sizeof(vTwo), SQLT_INT, (dvoid *) 0,
(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0,
OCI_DEFAULT); ... error stuff} OCIBindByName(stmthp, &bnd3[c], errhp, (text *) ":THREE", -1, (dvoid *) &vThree[c],
(sword) sizeof(vThree[c]), SQLT_BIN, (dvoid *) 0,
(ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0,
OCI_DEFAULT); ... error stuff
}
OCIStmtExecute(svchp, stmthp,errhp, 3, 0, 0, 0, OCI_DEFAULT); Received on Tue Jun 03 2003 - 17:29:23 CEST