C/C++ Precompiler v 2.2 Question

From: <james.strickland_at_dfas.mil>
Date: 26 Nov 1999 16:09:33 GMT
Message-ID: <81mbbt$hlj$1_at_news.netmar.com>



I'm trying to get null termination and no blank padding in the data I get from the database so I'm doing the following:

typedef char mychar;
EXEC SQL TYPE mychar IS string;

mychar FirstName[25];

    EXEC SQL

      SELECT FIRST_NM
      INTO :FirstName
      FROM NAME_TBL
      WHERE KEY = 'whatever';

I keep getting message like this:

(1) PCC-W-02344, Host variable array size mismatch. Using minimum: 2

I have chaeked to make sure that I'm defining the FirstName character array with one more byte that the specified max size in the database. FIRST_NM in the database is varchar2(24). What am I doing wrong?

  • Posted via NewsOne.Net: Free Usenet News via the Web -----
  • http://newsone.net/ -- Discussions on every subject. ----- NewsOne.Net prohibits users from posting spam. If this or other posts made through NewsOne.Net violate posting guidelines, email abuse_at_newsone.net
Received on Fri Nov 26 1999 - 17:09:33 CET

Original text of this message