X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C02E78B9F81 for ; Thu, 10 Feb 2005 14:32:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63221-09 for ; Thu, 10 Feb 2005 14:31:35 +0000 (GMT) Received: from mail21.nhs.uk (mail21.nhs.uk [62.6.139.215]) by svr1.postgresql.org (Postfix) with ESMTP id 35E5A8B9E13 for ; Thu, 10 Feb 2005 14:31:38 +0000 (GMT) Received: from [10.191.254.3] (helo=relayint1.nhs.uk) by mail21.nhs.uk with esmtp (MTC MTA) id 1CzFM2-00038q-4w for pgsql-odbc@postgresql.org; Thu, 10 Feb 2005 14:31:38 +0000 Received: from relay.nhs.uk (194.62.42.144) by relayint1.nhs.uk (Syntegra-I1 7.0.008) id 42001304002A5F69 for pgsql-odbc@postgresql.org; Thu, 10 Feb 2005 14:31:37 +0000 Received: from smtp2.tayside.scot.nhs.uk (10.252.0.27) by relay.nhs.uk (Syntegra-4 7.0.008) (authenticated as smtp2_tayside_scot_nhs_uk@es2002.nhs.uk) id 420A3C3800099CFC for pgsql-odbc@postgresql.org; Thu, 10 Feb 2005 14:31:37 +0000 Received: from smtp2.tayside.scot.nhs.uk (localhost [127.0.0.1]) by localhost.tayside.scot.nhs.uk (Postfix) with ESMTP id B73281A78 for ; Thu, 10 Feb 2005 14:31:31 +0000 (GMT) Received: from gonzalo.tuht.scot.nhs.uk (gonzalo.tuht.scot.nhs.uk [10.252.32.96]) by smtp2.tayside.scot.nhs.uk (Postfix) with ESMTP id 9B64D1A75 for ; Thu, 10 Feb 2005 14:31:31 +0000 (GMT) Received: from [192.168.1.46] (localhost [127.0.0.1]) by gonzalo.tuht.scot.nhs.uk (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0IBP00IHN9OIOZ@gonzalo.tuht.scot.nhs.uk> for pgsql-odbc@postgresql.org; Thu, 10 Feb 2005 14:31:31 +0000 (GMT) Date: Thu, 10 Feb 2005 14:31:31 +0000 From: Paul Cochrane Subject: Re: Compiling using Visual Studio 2003 In-reply-to: To: pgsql-odbc@postgresql.org Message-id: <420B7043.4030202@tuht.scot.nhs.uk> Organization: TORT Centre MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.28 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200502/55 X-Sequence-Number: 4945 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" >, "cms", "content", "TABLE", "" >, "information_schema", "applicable_roles", "VIEW", "" >, "information_schema", "check_constraints", "VIEW", "" >, "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 +--------------------------------------------------------