public inbox for [email protected]  
help / color / mirror / Atom feed
From: Sayan Oruspay <[email protected]>
To: [email protected]
Subject: BUG #17981: HY000 server closed the connection unexpectedly
Date: Tue, 20 Jun 2023 15:38:32 +0700
Message-ID: <CANdk+b+eSm05tBKLFLXFa4j+CxC6+_XtyZfu5t2tqjpeDXB4Lw@mail.gmail.com> (raw)

I am writing an application on Windows that connects to the local database
through psqlodbc. I want to make it automatically detect connection loss
and reconnect. When I manually stop the database service and try to send a
query, I get an error with sqlstate HY000 and the message ' server closed
the connection unexpectedly'. Shouldn't sqlstate be something like 08S01?
Also  SQLGetConnectAttr with SQL_ATTR_CONNECTION_DEAD does not produce the
right value. The value it returns is always SQL_CD_FALSE.


reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: BUG #17981: HY000 server closed the connection unexpectedly
  In-Reply-To: <CANdk+b+eSm05tBKLFLXFa4j+CxC6+_XtyZfu5t2tqjpeDXB4Lw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox