Re: [INTERFACES] Re: ODBC driver and Dates

From: Stephen Davies <scldad(at)sdc(dot)com(dot)au>
To: Hannu Krosing <hannu(at)trust(dot)ee>
Cc: Byron Nikolaidis <byronn(at)insightdist(dot)com>, "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] Re: ODBC driver and Dates
Date: 1998-04-17 09:14:58
Message-ID: 199804170914.SAA29622@mustang.sdc.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> > HERE IS A POSSIBLY USEFUL BUT UNDOCUMENTED FEATURE OF THE NEW ODBC DRIVER:
> >
> > By the way, there is a feature in this driver that allows you to send simple
> > commands to the driver at connection time. Its registry key is 'ConnSettings'
> > and it can be on a driver level or datasource level, or both.
> >
> > Here is an example, if you had a datasource called 'co1', then in the registry
> > under the HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\co1 you would create a String
> > Value called 'ConnSettings' which can contain a list of commands, separated by
> > semicolans, to send to Postgres on a successful connection. Example, "set geqo
> > to 'off'; set datestyle to 'ISO' "
> >
> > You can also set this on a driver level so that for any datasource these
> > commands would be set. That key is
> > HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL
> > and it is also called 'ConnSettings'.
> >
> > It will first send the driver 'ConnSettings' (if any) followed by the datasource
> > 'ConnSettings' (if any).
> >
> > This feature has its limitations. For example, it can only handle commands;
> > not queries that would generate tuples.
>
> Well, that is a useful feature indeed, and I think that this will solve
> the whole problem without changing the driver code. But the install
> script
> should set this to "set Datestyle to 'US';" for all of us poor
> non-americans
> (and it would'nt hurt those who use the US dates neither).
>
> > P.S., Please send these notes to the pgsql-interfaces(at)postgreSQL(dot)org list so
> > that everyone can read them, including me.
>

Ahah!! A whole new ball game:-))

This indeed sounds very good.

The caveat is that "we poor dumb users" should not need/be allowed to fiddle
with the registry.

Something like an "Advanced Features" button on the DSN definition form that
allowed the entry of these commands would be an excellent feature I reckon.

It even fits into the ODBC model as these can be seen as "connection
attributes" that are being externalised for apps such as MS Query that have no
other mechanism for setting such attributes.

Cheers,
Strephen
========================================================================
Stephen Davies Consulting scldad(at)sdc(dot)com(dot)au
Adelaide, South Australia. Voice: 61-8-82728863
Computing & Network solutions. Fax: 61-8-82741015

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dario Fumagalli 1998-04-17 09:46:08 Re: Possible bugs in ODBC driver
Previous Message Aleksey Demakov 1998-04-17 08:18:28 Re: ODBC driver and Dates