pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Cochrane <paul.m.cochrane@tuht.scot.nhs.uk>
To: pgsql-odbc@postgresql.org
Subject: Re: Compiling using Visual Studio 2003
Date: Thu, 10 Feb 2005 12:05:59 +0000
Message-ID: <420B4E27.6000502@tuht.scot.nhs.uk> (raw)
In-Reply-To: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A76@ratbert.vale-housing.co.uk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A76@ratbert.vale-housing.co.uk>

Dave Page wrote:

> 
>
>  
>
>>-----Original Message-----
>>From: pgsql-odbc-owner@postgresql.org 
>>[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Paul Cochrane
>>Sent: 10 February 2005 11:06
>>To: pgsql-odbc@postgresql.org
>>Subject: [ODBC] Compiling using Visual Studio 2003
>>
>>Hi there
>>
>>I'm trying to compile the psqlodbc driver using visual studio 
>>2003. I'm 
>>not an expert at this program but have managed to get it to 
>>compile (& 
>>work) with tons of warnings. Does anyone know if (a) this is usual to 
>>get all these warnings on compiling in windows and (b) should I worry 
>>about any of them?
>>    
>>
>
>You should get few, if any warnings.
>  
>
I'm getting 65!!.

I've just figured out what was causing it. It was the option for Detect 
64 bit Portability issues. I now get 0 warnings and feel much happier 
now :-)

Off topic,  FYI, I couldn't get the command line nmake to work. I did 
try putting in extra search paths & stuff but gave up shortly thereafter 
and continued my fight with the IDE.

>>My reasons for compiling are that I'm hoping to hack the 
>>driver a little 
>>to allow me to use Paradox to connect to a more recent version of 
>>Postgres. I'm currently limited to using 7.2.X as that was the last 
>>version that did not use schemas. I think with a little 
>>hacking I'll be 
>>able to hide the "information_schema" and also the "public." from the 
>>table names returned to Paradox through ODBC (indeed I've already 
>>figured out how to do this but am having another issue that I've not 
>>worked through yet).
>>    
>>
>
>Why are you limited to 7.2.x? The driver works just fine with all recent
>versions of PostgreSQL (bar the odd minor bug of course).
>
>  
>

I asked years ago agout this. Google for "psqlodbc bde schema" and it's 
the first match. Basically when using a schema enabled postgres the 
table names are returned as 'public.tablename' instead of plain 
'tablename'. This screws up the applications as it upsets all the data 
models for the forms. The application needs to work with both the 
paradox table version and postgres so I need a way of hiding the 
"public." returned to paradox. I've managed to do this by adding another 
compile option "HIDE_PUBLIC_SCHEMA" and modifying the PGAPI_TABLES 
routine to return NULL if the schema name happens to be PUBLIC (#ifdef 
around the line set_tuplefield_string(&row->tuple[1], 
GET_SCHEMA_NAME(table_owner));). This seems to work.

My next problem which I'm working on at the moment is that the new 
driver completely crashes with no error messages when opening certain 
tables. I can open some but others simply crash paradox (no GPF no 
nothing). All I get is 2 errors in the server log: could not receive 
data from client: Connection reset by peer &
unexpected EOF on client connection.

I'm not expecting you to solve this one at present. It may be paradox 
being a bit flaky and nothing to do with the ODBC driver (although I 
suspect it is). All I know is that it works with psqlodbc 7.3.200 & 
postgres 7.2.X but isn't working with my compiled driver 8.0.4 and 
postgres 8.0.1. I'm about to downgrade postgres to 7 to see if that has 
any more luck.

Thanks for getting back so quickly.


-- 
  Paul Cochrane       (paul.m.cochrane@tuht.scot.nhs.uk)
+--------------------------------------------------------
| Tayside Orthopaedic & Rehabilitation Technology Centre
| Ninewells Hospital & Medical School
| Dundee, Scotland, UK.	
| DD1 9SY
| Phone: Internal: 36284
|        External: +44 (1382) 496284
| Fax:   +44 (1382) 496322
+--------------------------------------------------------	




view thread (11+ messages)  latest in thread

Message-ID: <420B4E27.6000502@tuht.scot.nhs.uk>
Permalink:  ../420B4E27.6000502@tuht.scot.nhs.uk/
Also on:    postgresql.org/message-id/420B4E27.6000502@tuht.scot.nhs.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: paul.m.cochrane@tuht.scot.nhs.uk
  Subject: Re: Compiling using Visual Studio 2003
  In-Reply-To: <420B4E27.6000502@tuht.scot.nhs.uk>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A76@ratbert.vale-housing.co.uk> <420B4E27.6000502@tuht.scot.nhs.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox