Re: Compiling using Visual Studio 2003 - Mailing list pgsql-odbc
From | Paul Cochrane |
---|---|
Subject | Re: Compiling using Visual Studio 2003 |
Date | |
Msg-id | 420B7043.4030202@tuht.scot.nhs.uk Whole thread Raw |
In response to | Re: Compiling using Visual Studio 2003 ("Dave Page" <dpage@vale-housing.co.uk>) |
List | pgsql-odbc |
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 +--------------------------------------------------------
pgsql-odbc by date: