Re: problem ODBC - Mailing list pgadmin-hackers

From Dave Page
Subject Re: problem ODBC
Date
Msg-id D85C66DA59BA044EB96AB9683819CF61137FA7@dogbert.vale-housing.co.uk
Whole thread Raw
In response to problem ODBC  ("frank_lupo" <frank_lupo@email.it>)
List pgadmin-hackers

> -----Original Message-----
> From: frank_lupo [mailto:frank_lupo@email.it]
> Sent: 25 July 2002 10:12
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] problem ODBC
>
>
> > >
> > > Show datestyle
> > > -> DateStyle is ISO with European conventions
> > > select now()
> > > 25/07/2002 9.01.57
> > >
> > > Change date style
> > > SET datestyle TO 'SQL' or  SET datestyle TO 'SQL,European'
> > > -> DateStyle is SQL with European conventions
> > > select now()
> > > In Visual Basic error -2147217887
> > >
> > > This problem is present also in PgAdmin2.
> > >
> > > Help me
> > >
> > When does the error occur in pgAdmin?
>
> The error occurs in window sql interactive.
> Try to insert in sequence the instructions listed in my previous
> message.

Ahh yes. I would expect that to happen. VB tries to interpret the dates
rather than handle them as text strings. The most reliable way of doing
this is to use ISO format - other formats may not be recognised by VB. I
always suggest people use ISO formatted dates on the server and to let
the client application reformat them to the local style as required.
E.g.

Text1.Text = Format(rs!datefield, "Long Date")

Regards, Dave.

pgadmin-hackers by date:

Previous
From: "frank_lupo"
Date:
Subject: Re: problem ODBC
Next
From: "Poul L. Christiansen"
Date:
Subject: datetime local bug