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

Re: [INTERFACES] Access'97 and ODBC

From: Sbragion Denis <infotecn(at)tin(dot)it>
To: Byron Nikolaidis <byronn(at)insightdist(dot)com>, Hannu Krosing <hannu(at)trust(dot)ee>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Access'97 and ODBC
Date: 1998-04-29 07:05:07
Message-ID: 3.0.5.32.19980429090507.007f5ea0@MBox.InfoTecna.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Hello,

At 17.32 28/04/98 -0400, Byron Nikolaidis wrote:

>I understand what you are saying here, and am very tempted to just go with
>setting the datestyle to US at connection time by default.  It is true that
>this would have no negative effect on applications such as Access.
>
>But, before I do, is there cases out there where people are executing DIRECT
>queries through the driver where they are expecting the date to be in a
>particular format such as:
>
>insert into tablex (date1) values('28-04-1998')                #  DD-MM-YYYY
>format
>
>If the driver always sets the datestyle to "US", the above insert might not
>work.  Of course, I would imagine the query should be written more portably
>using the ODBC shorthand escape syntax, as:
>
>insert into tablex (date1) values( {d '1998-04-28'} ),
>
>which would work correctly.  The reverse is true also, if the user does
>"select date1 from tablex", and uses SQL_C_CHAR as the return type,
>expecting the format to be EURO, when in fact it would be US.
>
>If no one has any objections, I will change the driver to always set the
>datestyle to US, and forget about adding a selection to the dialogs to
>select it.

Microsoft says that the US date format is *always* recognized by the Jet
database engine, no matter of the windows interntional settings, and it
suggest to use US date format as a kind of international date format. This
means that whenever you don't know in which country your program will be
executed, it is safe to use the US date format. Setting US datestyle by
default in the ODBC driver will provide a behaviour which is much similar
to the Jet database engine, i.e. the behaviour Access/VB programmers
usually have to deal with. So go on with this solution !

Bye !

P.S. I tested the new ODBC driver with index support. VisData still isn't
able to show the index list, anyway it sees them because it allow updates.
Used with VB the ODBC is rather slow compared with other ODBC (About 10
time slower than MS SQL and Velocis, about 30 times slower than MySql) but
it works pretty well. Anyway it is about 3/4 times faster than the OpenLink
driver, which is also pretty buggy ;) Really good job Byron !

	Dr. Sbragion Denis
	InfoTecna
	Tel, Fax: +39 39 2324054
	URL: http://space.tin.it/internet/dsbragio

In response to

Responses

pgsql-hackers by date

Next:From: Michael MeskesDate: 1998-04-29 08:35:31
Subject: Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes
Previous:From: Peter MountDate: 1998-04-29 07:01:29
Subject: RE: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes

pgsql-interfaces by date

Next:From: Michael MeskesDate: 1998-04-29 08:35:31
Subject: Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes
Previous:From: Peter MountDate: 1998-04-29 07:01:29
Subject: RE: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes

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