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 14:31:31 +0000
Message-ID: <420B7043.4030202@tuht.scot.nhs.uk> (raw)
In-Reply-To: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A81@ratbert.vale-housing.co.uk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A81@ratbert.vale-housing.co.uk>
Dave Page wrote:
>>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.
>>
>>
>
>That's how I build it all the time. Did you run vcvars32.bat first? That
>should be all that is needed.
>
>
>
I'm Thick. What is this file? It doesn't seem come with psqlodbc and
there is no mention of it in the doc on the GBORG site about compiling
the driver. I was changing to the extracted dir & trying nmake.....
>>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.
>>
>>
>
>SQLTables does it as it should:
>
>SQLTables:
> In:
>StatementHandle = 0x003B16F8, CatalogName = SQL_NULL_HANDLE, NameLength1
>= 0, SchemaName = SQL_NULL_HANDLE, NameLength2 = 0,
>
>TableName = SQL_NULL_HANDLE, NameLength3 = 0, TableType =
>SQL_NULL_HANDLE, NameLength4 = 0
> Return: SQL_SUCCESS=0
>
>Get Data All:
>"TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "TABLE_TYPE", "REMARKS"
><Null>, "cms", "content", "TABLE", ""
><Null>, "information_schema", "applicable_roles", "VIEW", ""
><Null>, "information_schema", "check_constraints", "VIEW", ""
><Null>, "information_schema", "column_domain_usage", "VIEW", ""
>...
>...
>
>The schema is in the TABLE_OWNER column (as it is on SQL Server
>incidently).
>
I know that the driver is doing it as it supposed to. It's paradox/BDE
that can't cope with the schema stuff.
>If Paradox is prepending it onto the tablename, then it
>should be fixed (though I appreciate you probably can't do that :-) ).
>
>
I wish I could. Open source is a great invention. If its broken try and
fix it yourself.
>Can you work around it in your Paradox code though?
>
>
I can fix it in code but this would break the compatibility of using
either the paradox tables or postgres tables. I would have to have two
different versions of each form etc & record many lines of code to say
"If in postgres add a public. to every table name" which is a huge pest
& I don't want to have two version of each form to try & keep in sync
with each other.
If I get it working, I may update the ODBC driver form to have a couple
of tick boxes to make this an option in the driver and send you the
changes made.
--
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
+--------------------------------------------------------
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: <420B7043.4030202@tuht.scot.nhs.uk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4528A81@ratbert.vale-housing.co.uk> <420B7043.4030202@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