Re: blank truncation on INSERTs

From: Paula Veltkamp <pveltkam_at_ems.cdc.com>
Date: 9 Oct 92 16:19:32 GMT
Message-ID: <28962_at_nntp_server.ems.cdc.com>


In article <1992Oct8.200941.6499_at_cas.org>, rwm26_at_cas.org (Ron McCamish) writes:
|>
|> I'm having a problem INSERTing fields using Pro*C 1.3 and dynamic sql,
|> method 4. If I try to insert a field with 1 or more blanks at the
|> end, ORACLE seems to truncate the blanks.
|>
|> For example, in sql*plus,
|>
|> INSERT INTO CRAP(CRAP1, CRAP2) VALUES('XXXX ', 'XXX ');...
|>
|> bind_dp->N=bind_dp->F;
|> bind_dp->L[0]=4;
|> bind_dp->L[1]=5;
|> bind_dp->V[0]="XXXX ";
|> bind_dp->V[1]="XXX ";
|> bind_dp->I[0]=0;
|> bind_dp->I[1]=0;
|> bind_dp->T[0]=1;
|> bind_dp->T[1]=1;
|>

Ron,

   I noticed you have the bind_dp->T[] equal to the default 1 value (char).    Try resetting them to 5 (null-terminated char) or 9 (VARCHAR). In my programs,    ORACLE couldn't handle the unterminated character strings correctly.

   Paula Received on Fri Oct 09 1992 - 17:19:32 CET

Original text of this message