Re: VARCHAR and lengths in Pro*C

From: Tim Smith <tssmith_at_netcom.com>
Date: Sat, 24 Sep 1994 22:56:35 GMT
Message-ID: <tssmithCwnp2B.7BK_at_netcom.com>


alanb_at_VNET.IBM.COM (Alan Beal) writes:
>I am trying to figure out if I can declare a VARCHAR host variable
>in Pro*C where the length is determined by a define rather than
>hard-coded. Is this possible? I am able to do this:
> VARCHAR field1[20];
>but not:
>#define f1_len 20
> ...
> VARCHAR field1[f1_len];
>Any hints?

You can do this in Pro*C 2.0 or 2.1. It is not possible in versions of Pro*C earlier than 2.0. Pro*C 2.x includes a C preprocessor (with a very few limitations, see the manual).

--Tim (tssmith_at_netcom.com) (tssmith_at_oracle.com) Not speaking in any official capacity for Oracle Corp. Received on Sun Sep 25 1994 - 00:56:35 CEST

Original text of this message