Re: DIAG [HY000] server closed the connection unexpectedly
От | Tsunakawa, Takayuki |
---|---|
Тема | Re: DIAG [HY000] server closed the connection unexpectedly |
Дата | |
Msg-id | 0A3221C70F24FB45833433255569204D1F632480@G01JPEXMBYT05 обсуждение исходный текст |
Ответ на | Re: DIAG [HY000] server closed the connection unexpectedly ("Jon Raiford" <Raiford@labware.com>) |
Ответы |
Re: DIAG [HY000] server closed the connection unexpectedly
|
Список | pgsql-odbc |
Hi, Jon From: pgsql-odbc-owner@postgresql.org > [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Jon Raiford > It would seem that I was mistaken. My simple test case did produce the > expected 08001 SQLSTATE with the updated driver, but when I scaled up to > multiple connections it was not consistent. In the end I am now simply > check HY000 errors and change them to 08001 if the text matches "*server > closed the connection*". A brute force method, but it allows me to move > forward. > > Of course it may be that I made a mistake in applying the patch or my build > environment. I will happily test an updated build when it becomes available > and report back. First, the SQLSTATE is 08S01, not 08001. Yes, I'd appreciate it if you could report back the details. I have no idea about any problem which can happen with simultaneousmultiple connections. BTW, you seem to want a method to judge that the connection is lost. Then, SQLGetConnectAttr(hdbc, SQL_ATTR_CONNECTION_DEAD)should be the right answer. See the following page, and please try it. https://msdn.microsoft.com/en-us/library/ms713605(v=vs.85).aspx SQL_ATTR_CONNECTION_DEAD A read-only SQLUINTEGER value that indicates the state of the connection. If SQL_CD_TRUE, the connection has been lost. IfSQL_CD_FALSE, the connection is still active. > Assuming this is accepted and committed, is there any idea when an official > updated installer may be posted? Sorry, I'm not in the position to decide it. Inoue-san and Saito-san will do. Regards Takayuki Tsunakawa
В списке pgsql-odbc по дате отправления: