Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI string bound to VARCHAR2 - FK constraint failure

Re: OCI string bound to VARCHAR2 - FK constraint failure

From: Jan-Marten Spit <j.m.spit_at_uptime.nl>
Date: Wed, 19 Jan 2000 10:31:23 +0100
Message-ID: <864008$i71$1@porthos.nl.uu.net>


Have you tried using indicator variables?

This because the Oracle error you get simply means that the data that you insert does not exist in the parent table. Try using indicator variables, and use them to specify that you are inserting data, not nulls.

Specify the indicator variable(s) in OCIBindByPos and optionally in OCIBindArrayOfStruct (in the case you are doing an array insert). Initialize the indicator varibles to 0, indicating that you are inserting values. If the indicator is set to -1, you tell the OCI to insert o NULL, regardless of the value you assign to the program variable.

By the way, there ARE some bugs in 805, i moved to 815. Cant remember this one however, and i used the same method as you did. But i used indicator variables.

Hope this helps.

Jan-Marten Spit Received on Wed Jan 19 2000 - 03:31:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US