Re: pro*c error 1458 at run time

From: Matt B. <gtimatt_at_home.com>
Date: Fri, 10 Aug 2001 01:01:05 GMT
Message-ID: <lnGc7.43725$MC1.13298380_at_news1.elcjn1.sdca.home.com>


"Jeff Kish" <jeff.kish_at_ait-mmii.com> wrote in message news:sme5nto1bmcgevr2vcbh586nb761asrlo3_at_4ax.com...
> Greetings.
>
> I am writing a database module using pro*c against Oracle 7.34/8.0.
> The target database is configuration with respect to column widths.
> My demo database I test against has a column which is declared like
> this: GLDEBITACCT VARCHAR2(20)
>
> However, if I use a variable like this to pass data into an insert
> statement:
>
> VARCHAR debitGLAcct[180];
>
> At runtime the insert generates a 1458.
>
> If I change it to:
>
> VARCHAR debitGLAcct[21];
>
> The insert occurs successfully.
>
> Question: How can I deal with the possibility of unknown column sizes
> if I can not make my variables long enough for contigencies?

Try doing a RTRIM on the variable in your INSERT statement.

-Matt Received on Fri Aug 10 2001 - 03:01:05 CEST

Original text of this message