Re: [INTERFACES] Problem with Postgres/ODBC Driver.

From: Byron Nikolaidis <byronn(at)solipsys(dot)com>
To: robertC(at)opmr(dot)com
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Problem with Postgres/ODBC Driver.
Date: 1999-08-31 18:14:05
Message-ID: 37CC1B6D.9291E3A8@solipsys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Robert Carbonari wrote:

> <snip>

> My question, then, is this: How can I access fields which have spaces and
> Caps in them {CREATE TABLE table_name ("Project Manager Name" text,
> ...);...} from my VBScript (using the Windows Scripting Host) when I employ
> the Postgres/ODBC driver from Insight?
> Is there some special way to pass these special field names to the driver so
> that it can understand and properly translate them to Postgres (on Linux)?
> Or must I resort to naming the fields in Postgres in the conventional way
> and leave it at that?
> Here is the driver information:
> odbc driver version: 6.30.0250
> postgresql database version: 6.4
>

Version 6.4 of the driver/database and above will handle mixed case and spaces.
In order to preserve spaces and case, you need to use double quotes around the
field names. This goes for table names as well, which can also have spaces and
mixed case. I'm not sure if you are directly controlling this in your script
or not. Some applications (e.g. Access) automatically add the quotes around
field and table names based on some info returns of the driver, such as the
following:

SQL_IDENTIFIER_CASE,
SQL_IDENTIFIER_QUOTE_CHAR,
SQL_QUOTED_IDENTIFIER_CASE

There were some anomolies with some applications that didn't exactly interpret
the above info returns the way I would think they should, and thus wouldn't work
properly with quotes.

Byron

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message gotzdx 1999-08-31 18:22:23 LQQK 6519
Previous Message harry 1999-08-31 17:58:32 sex 8485