Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects

From: Byron Nikolaidis <byronn(at)insightdist(dot)com>
To: angg <angg(at)vng(dot)ru>
Cc: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
Date: 1998-10-22 14:59:30
Message-ID: 362F4852.5302207B@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

angg wrote:

> Byron, I tried to build driver with MS Visual C++ 5.0, but the proces failed
> with the following messages:
> [...]
> C:\Program Files\DevStudio\MyProjects\psqlodbc\execute.c(132) : warning
> C4229: anachronism used : modifiers on data are ignored
> gpps.c
> info.c
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(846) : error C2065:
> 'SQL_NUM_FUNCTIONS' : undeclared identifier
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(848) : error C2065:
> 'SQL_EXT_API_START' : undeclared identifier
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(848) : error C2065:
> 'SQL_EXT_API_LAST' : undeclared identifier
> [...]
>
> It isn't my compiler so I'm not sure it was installed properly. So far as
> can understand some *.h files are absent. Can you tell me which. I'm now
> seeking another opportunity to build the driver. I work to the North of
> Russia and it isn't a simple task :-).
>
> Mikhail.

Since I use VC4.0, which includes the old sql include files, there is not a
problem.

On VC5.0, the newer odbc 3.0 sql include files are used. Therefore, the driver
needs to specify the ODBCVER explicitly, otherwise it defaults to 3.0 which is
the problem.

Solution:

1. Somewhere in "psqlodbc.h", add the following line:

# define ODBCVER 0x0200

2. In connection.h, move the #include "psqlodbc.h" to prior to #ifdef HAVE_IODBC

3. In statement.h, move the #include "psqlodbc.h" to prior to #ifdef HAVE_IODBC

4. In convert.c, add the line #include "psqlodbc.h" prior to #ifdef HAVE_IODBC

As for the anachronism thing, you can either ignore it or just remove the
SQL_API keyword.

I will try to get these corrections into the next release.

Thanks,

Byron

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gerald Gryschuk 1998-10-22 15:07:22 Re: [INTERFACES] New docs and ODBC for Unix
Previous Message Tom Lane 1998-10-22 14:58:05 Re: [INTERFACES] PgConnection