Re: PRO*C precompiler problem with char pointers
From: L. Scott Johnson <sjohnson_at_math.scarolina.edu>
Date: 10 Jan 1995 23:50:51 GMT
Message-ID: <3ev6gr$geu_at_redwood.cs.scarolina.edu>
Date: 10 Jan 1995 23:50:51 GMT
Message-ID: <3ev6gr$geu_at_redwood.cs.scarolina.edu>
John Morgan <John_Morgan_at_OIT.PeachNet.EDU> writes:
>We are using a char pointer in a Pro*C DECLARE section...when
>sqlcex is called, it gives these pointers to char (not string) variables
>a length of 0 (zero).
>This (eventually), we believe, leads to erroneous results in our program.
>Is there a work around??
Initialize the string (character pointer) with a value as long as the longest value expected. Oracle sets the length of character pointers on the first sqlcex call, by a (stupid) strlen() call.
Better to use varchar in most cases, but I don't know you whole story, so... Received on Wed Jan 11 1995 - 00:50:51 CET