EXEC SQL TYPE for pointers in pro*c
From: Johan Hellstrom <johanh_at_wanderer.ldg.ibm.com>
Date: Wed, 10 Nov 1993 14:03:12 GMT
Message-ID: <CGA4DC.1tn7_at_hawnews.watson.ibm.com>
... works nice.
Date: Wed, 10 Nov 1993 14:03:12 GMT
Message-ID: <CGA4DC.1tn7_at_hawnews.watson.ibm.com>
It is nice, that you can declare pointers as host variables in pro*c.
EXEC SQL BEGIN DECLARE SECTION;
char *cu_id; char *cu_name;...
... works nice.
However now I want to rename char* to a user defined type - dbSTR:
EXEC SQL BEGIN DECLARE SECTION;
dbSTR cu_id;
dbSTR cu_name;
...
I tried the examples in the Pro*C supplement guide, but it was not happy with
typedef char *dbSTR;
EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL TYPE dbSTR IS CHARZ (or char*) [REFERENCE];
... it only complained about PCC-0091 (a length is needed) in booth cases.
Does anybody know a way to define a user defined type as a char* ?
Regards
/Johan Hellstrom Received on Wed Nov 10 1993 - 15:03:12 CET