memset(field.arr,'\0',field.len) or bzero(field.arr,field.len) should initialize those structures properly. On 03/18/2004 12:41:28 PM, "Bobak, Mark" wrote: > Hi all, > > Our database is currently at 8.1.7.4, but since at least some of our clients > are SGI, and there were numerous issues w/ Pro*C and 8.1.7 on SGI (n32, > 64-bit, etc), we chose to stay on 8.0.5 for the clients. > > Now, we are in the position of upgrading the database AND the client side to > 9.2.0.x (where x is probably 4, but may be 5, if it's released soon). As > part of this upgade, our clients are moving from SGI to Linux (as SGI is not > at all supported starting at 9.2.0). > > Ok, that's the background, now, on to the problem: > > Very many places in our code, we have declarations that look like: > > varchar po_output_variable[AO_SOME_LENGTH]; > > Now, I'm aware that the varchar is replaced by a structure definition by the > Pro*C precompiler. There's a '.len' and '.arr' component to the structure. > However, neither of these is initialized. > My problem is that when a call to the database happens, if the structure is > uninitialized, Oracle (may) raise ORA-1458 "invalid length inside variable > character string". > > This never happened w/ the 8.0.5 client. I'm not too keen on hand editing > several hundred Pro*C files to add initialization to all VARCHAR host > variables. > > Does anyone have any ideas/thoughts/suggestions? (Other than continuing to > use 8.0.5 client code? ;-)) > > Thanks in advance for any suggestions, > > -Mark > ---------------------------------------------------------------- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > ---------------------------------------------------------------- > To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx > put 'unsubscribe' in the subject line. > -- > Archives are at //www.freelists.org/archives/oracle-l/ > FAQ is at //www.freelists.org/help/fom-serve/cache/1.html > ----------------------------------------------------------------- > ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------