Re: ANSI compiling of PRO*C complains
From: wareing t computer services <p0070621_at_oxford-brookes.ac.uk>
Date: 24 Jan 1994 03:47:14 -0600
Message-ID: <CK4oD3.FsL_at_uk.ac.brookes>
Date: 24 Jan 1994 03:47:14 -0600
Message-ID: <CK4oD3.FsL_at_uk.ac.brookes>
Daryl Erwin (derwin_at_mach2.wlu.ca) wrote:
>>Anyways, the
>>problem is all the warning messages its spits out about varchar's
>>'unsigned char arr'. It seems that ay functon on variable.arr complains.
>>For instance strlen(variable.arr) will complain because strlen is
>>expecting a char not an unsigned char.
I've taken to declaring all my string variables as
EXEC SQL BEGIN DECLARE SECTION;
char name[40];
EXEC SQL VAR name IS STRING;
EXEC SQL END DECLARE SECTION;
which means you get full control over the type used, and Oracle will treat
it 'nicely': ie. as a null terminated string, so no faffing around
with name.arr[name.len]='\0' etc.
-- _________________________ _________________________ / Tommy Wareing \ / \ | p0070621_at_brookes.ac.uk X 'Bugger!' said Piglet | \ 0865-483389 / \ / ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~Received on Mon Jan 24 1994 - 10:47:14 CET