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

Поиск
Список
Период
Сортировка
От Byron Nikolaidis
Тема Re: [INTERFACES] Problem with Postgres/ODBC Driver.
Дата
Msg-id 37CC1B6D.9291E3A8@solipsys.com
обсуждение исходный текст
Ответ на Problem with Postgres/ODBC Driver.  (Robert Carbonari <robertC@opmr.com>)
Список 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



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: harry@onthe.net.au
Дата:
Сообщение: sex 8485
Следующее
От: gotzdx@onthe.net.au
Дата:
Сообщение: LQQK 6519