From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Mike Toews <mwtoews@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Connection Timeout
Date: Fri, 04 Jun 2010 00:55:47 +0900
Message-ID: <4C07D083.8010605@tpf.co.jp> (raw)
In-Reply-To: <AANLkTinKVoB2c6lnEoC10HwOvDGSZgYJB9nn14bBKl2z@mail.gmail.com>
References: <AANLkTin4MIcnAuT7VDVjBTdMMUgFkB8SxWBlId5Vgwi1@mail.gmail.com>
<4C076F51.9060202@tpf.co.jp>
<AANLkTinKVoB2c6lnEoC10HwOvDGSZgYJB9nn14bBKl2z@mail.gmail.com>
Mike Toews wrote:
> On 3 June 2010 02:01, Hiroshi Inoue <inoue@tpf.co.jp
> <mailto:inoue@tpf.co.jp>> wrote:
>
>
> What kind of tool(e.g. ADO, ADO.NET <http://ADO.NET; on Windows) are
> you using?
>
> regards,
> Hiroshi Inoue
>
>
> I'm using the PostgreSQL Unicode ODBC driver with Python (pyodbc) and
> VBA (ADO). I get the same 18 second timeout with both, regardless of
> what I provide in the connection string. In VBA, there is a
> ConnectionTimeout property, but it does not seem to have any influence,
> e.g.:
>
> ' With added reference Microsoft ActiveX Data Objects 2.x Library
> Sub test()
> Dim Conn As New ADODB.Connection
> Dim ConnStr as String
> ConnStr = "Driver={PostgreSQL
> Unicode};Server=123.4.5.6;Port=5432;Database=mydb;Uid=myid;Pwd=mypw;Timeout=5"
> Conn.CommandTimeout = 5
Please set the ConnectionTimeout preperty not the CommandTimeout one.
It seems to work here.
> Conn.ConnectionString = ConnStr
> Conn.Open
> Debug.Print "connected"
> Conn.Close
> Set Conn = Nothing
> End Sub
>
> It takes 15 seconds to throw an error at "Conn.Open, since the host is
> invalid.
>
> pyodbc has a Connection.timeout property, but it is for query timeout.
>
> -Mike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, mwtoews@gmail.com
Subject: Re: Connection Timeout
In-Reply-To: <4C07D083.8010605@tpf.co.jp>
References: <AANLkTin4MIcnAuT7VDVjBTdMMUgFkB8SxWBlId5Vgwi1@mail.gmail.com> <4C076F51.9060202@tpf.co.jp> <AANLkTinKVoB2c6lnEoC10HwOvDGSZgYJB9nn14bBKl2z@mail.gmail.com> <4C07D083.8010605@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox