Re: [INTERFACES] Access'97 and ODBC - Mailing list pgsql-interfaces

From Sbragion Denis
Subject Re: [INTERFACES] Access'97 and ODBC
Date
Msg-id 3.0.5.32.19980429090507.007f5ea0@MBox.InfoTecna.com
Whole thread Raw
In response to Re: [INTERFACES] Access'97 and ODBC  (Byron Nikolaidis <byronn@insightdist.com>)
List pgsql-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

pgsql-interfaces by date:

Previous
From: Peter Mount
Date:
Subject: RE: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes
Next
From: "Jose' Soares Da Silva"
Date:
Subject: jdbc vs. odbc performance