Help with varchar/Pro*C Warning Message

From: James Yorton <jjy_at_typhoon.xnet.com>
Date: 1998/12/22
Message-ID: <75orm3$9c3$1_at_flood.xnet.com>#1/1


Here's my environment:

Oracle 7.3.4
[Quoted] Pro*C/C++: Release 2.2.4.0.0

I'm porting an application to Solaris 2.6 from SunOS 4.1.3 and am getting the warning:

Warning at line 48, column 0, file sql_status.pc:

        EXEC SQL SELECT id, status
......1
(1) PCC-W-02344, Host variable array size mismatch. Using minimum: 21

I don't believe there is a mismatch though. Pro*C code that precompiled cleanly now complains about the statement:

EXEC SQL SELECT id, status

       INTO :id, :st
       FROM STATUS;

where id, status are:

unsigned id[50];
varchar st[21][50];

and are associated with table definitions:

ID                              NOT NULL NUMBER(38)
STATUS                                   VARCHAR2(20)

In order to prevent the warning, I must declare st to be varchar[50][50].

[Quoted] Anything less than 50 (for the size of the varchar string, not the size of the array of that) causes the "using minimum" warning above with whatever number I use. I'd prefer to dimension the varchar string to match that of its corresponding table definition. So varchar st[49][50] causes:
(1) PCC-W-02344, Host variable array size mismatch. Using minimum: 49

Has something changed with varchars and this release of Pro*C? Thanks for any help.

Jim Received on Tue Dec 22 1998 - 00:00:00 CET

Original text of this message