ecpg: use of #defines - Mailing list pgsql-interfaces

From James Thompson
Subject ecpg: use of #defines
Date
Msg-id Pine.LNX.4.10.9902201017420.897-100000@hobbes.math.ksu.edu
Whole thread Raw
In response to Newbie: Access to PostgreSQL from Windows 3.11  (Christof Klaiber <ut2h@rz.uni-karlsruhe.de>)
Responses Re: [INTERFACES] ecpg: use of #defines
List pgsql-interfaces

Hello,



In my exec sql begin declare section i have items like

 char uid_result[31];

which I tried to replace last night with
  char uid_result[UID_LEN];

  and I placed #define UID_LEN 31 in a .h file

  I changed my #include with a exec sql include to include the .h file

  The parser didn't like the char uid_result[UID_LEN] line

  I'm pretty sure I understand the mechanics of this, cpp hasn't run and
  UID_LEN is an invalid value.

Is there a workaround?  Other than hard coding the 31

Thanks

->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
James Thompson    138 Cardwell Hall  Manhattan, Ks   66506    785-532-0561
Kansas State University                          Department of Mathematics
->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<



pgsql-interfaces by date:

Previous
From: Christof Klaiber
Date:
Subject: Newbie: Access to PostgreSQL from Windows 3.11
Next
From: Michael Meskes
Date:
Subject: ecpg idea