Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 39AD99FC047 for ; Wed, 8 Aug 2007 19:27:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 79806-04 for ; Wed, 8 Aug 2007 19:27:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from rrmailscan3.safenetbox.biz (mailscan3.reynolds.com.au [203.25.40.75]) by postgresql.org (Postfix) with ESMTP id EBE649FBF2E for ; Wed, 8 Aug 2007 19:26:57 -0300 (ADT) Received: from rrmailscan3.safenetbox.biz (rrmailscan3.safenetbox.biz [127.0.0.1]) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id 14E441D4845C for ; Thu, 9 Aug 2007 08:26:56 +1000 (EST) Received: from [127.0.0.1] (online4-new.lnk.telstra.net [139.130.169.227]) (Authenticated sender: remote) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id 23D761D48444 for ; Thu, 9 Aug 2007 08:26:55 +1000 (EST) Message-ID: <46BA42E5.30407@autoledgers.com.au> Date: Thu, 09 Aug 2007 06:25:41 +0800 From: Paul Lambert User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: ODBC driver adding extra characters to table names. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/15 X-Sequence-Number: 9132 *REPOST* Just in case this got missed on the end of my last thread. I'm still having the problem with a few of the tables in my database reporting: "The Microsoft Jet database engine could not find the object public.billing_code'. Make sure the object exists and that you spell its name and the path name correctly" When I attempt to link them in MS access. It seems that any tables in my database that contain an underscore in the table name are giving this problem. Can't see any settings in the DSN that might fix this though. for example, the psqlodbc_.log file has the following when I attempt to link a table called billing_code: select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, d.adsrc from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.relname like 'billing\\_code' and n.nspname like 'public') inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum' Note the 'billing\\_code' in there. If I run this query in psql I get no rows. If I change it to 'billing\_code' or 'billing_code' (taking out one or both of the backslashes) I get the table details. It seems to me that the odbc driver is not handling underscores in the table name correctly - perhaps a conflict with the driver and me having turned on standard_conforming_strings in postgresql.conf? Any thoughts? -- Paul Lambert Database Administrator AutoLedgers