Skip site navigation (1) Skip section navigation (2)

MSACCESS & Apostrophe in Column Name

From: Bob Woodside <proteus(at)pcnet(dot)com>
To: PostgreSQL ODBC Mail List <pgsql-odbc(at)postgresql(dot)org>
Subject: MSACCESS & Apostrophe in Column Name
Date: 2001-06-15 17:01:05
Message-ID: 3B2A3F51.3702A0FF@pcnet.com (view raw or flat)
Thread:
Lists: pgsql-odbc
 
	Here's a curious problem. We recently exported an Access table to
PostgreSQL. The table has 3 column names containing apostrophes (or
single-quotes, if you like). This seems to confuse some bit of parsing
logic somewhere in the ODBC path, whenever a dynaset query is sent from
Access that has an odd number of references to these apostrophic names.

	If we issue a query with an odd number of these references, the back
end receives something like this:

> 'SELECT "ID","Month called or rec'd form","FullName"  FROM "GHI-practice2"
>   WHERE "ID" = ? OR "ID" = ? OR "ID" = ? OR "ID" = ? OR "ID" = ? OR "ID" = ?
>   OR "ID" = ? OR "ID" = ? OR "ID" = ? OR "ID" = ?'

which, of course, it rejects.

	If we issue a query with an even number of such references, the back
end receives something like this, and is very happy:

> SELECT "ID","Month called or rec'd form","Day called or rec'd form","FullName"
>   FROM "GHI-practice2"  WHERE "ID" = 1 OR "ID" = 3 OR "ID" = 4 OR "ID" = 6
>  OR "ID" = 8 OR "ID" = 9 OR "ID" = 11 OR "ID" = 12 OR "ID" = 13 OR "ID" = 14'


	I've captured traces from the ODBC manager and from the pgsql driver,
and can forward them if you like. I haven't yet had time to try to dig
into this any deeper to determine whether the bug is in the Postgres
driver or in MS code.

	Has anyone got any idea where the problem lies? Is it a known problem
with a known workaround, or a new, um, opportunity?


Cheers,
Bob

pgsql-odbc by date

Next:From: Johann ZuschlagDate: 2001-06-15 17:47:13
Subject: Re: slow performance postgres 7.0.3 and odbc
Previous:From: Javier YáñezDate: 2001-06-15 13:54:58
Subject: Re: slow performance postgres 7.0.3 and odbc

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group