From: Paul Lambert <paul.lambert@autoledgers.com.au>
To: pgsql-odbc@postgresql.org
Subject: ODBC driver adding extra characters to table names.
Date: Thu, 09 Aug 2007 06:25:41 +0800
Message-ID: <46BA42E5.30407@autoledgers.com.au> (raw)
*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_<pid>.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
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.lambert@autoledgers.com.au
Subject: Re: ODBC driver adding extra characters to table names.
In-Reply-To: <46BA42E5.30407@autoledgers.com.au>
References: <46BA42E5.30407@autoledgers.com.au>
* 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