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: A crazy ORA-01480 error! (SOLVED)

Re: A crazy ORA-01480 error! (SOLVED)

From: Adriano Prado <prado_at_gmx.net>
Date: Wed, 15 Mar 2000 19:22:44 GMT
Message-ID: <8aontt$3nm$1@nnrp1.deja.com>


In article <8ao79o$lr2$1_at_nnrp1.deja.com>, Adriano Prado <prado_at_gmx.net> wrote:
> Hi all,
> I've got a crazy problem here. I'm inserting data into a table using
> Pro*C.
>
> Look what I did:
> int fld1 = 10;
> ...
> char fldn[] = "COL2";
> EXEC SQL INSERT INTO my_table
> (COL1, COL_DATE, ..., COLn)
> VALUES
> (:fld1, SYSDATE, ..., :fldn);
>
> My program was running well till I've inserted the last field. The
only
> one that is a VARCHAR2. All other are NUMBERs and one is a DATE field.
> After that, when I run the prog, it says: "trailing null missing from
> STR bind value" (ORA-01480)!!!!!!!!!!!
>
> I've done a single program that has only three fields (two VARCHAR2s
and
> on NUMBER), did the insert using the same data as above and no error
has
> appeared.
>
> So, what a heck is going on???????????? I've already did changed de
char
> to a pointer to char, forced a NULL into the char var (fldn[3] =
0;)...
> and nothing worked.
>
> Oh, I'm running it in a Digital Workstation (with UNIX 4.0d). And I'm
> using the DBMS=V7 on Pro*C command line.
>
> THANX!
> --
> ---------------(cut here)---------------

errr.... sorry guys, but I've done #@#%$@# here... what was happening is that all my vars are arrays but the char... that is, I was trying to insert just one string were it should be insert an array of strings (str[NUM_ELEM][SIZ]).

---------------(cut here)--------------- Adriano Prado
prado_at_gmx.net

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Mar 15 2000 - 13:22:44 CST

Original text of this message

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