ijibu / odbc

Automatically exported from code.google.com/p/odbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

odbc driver does not reconnect after connection failure #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
{08S01} [Microsoft][ODBC SQL Server Driver]Communication link failure

This problem can cause network failure after a short period of recovery.

Original issue reported on code.google.com by gzw13...@gmail.com on 4 Jun 2015 at 4:18

GoogleCodeExporter commented 9 years ago
If you want to be able to recover after network failures, then I don't know of 
a way to do it. Feel free to prove me wrong.

Closing issue for now.

Alex

Original comment by alex.bra...@gmail.com on 4 Jun 2015 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by alex.bra...@gmail.com on 4 Jun 2015 at 5:17

GoogleCodeExporter commented 9 years ago
A very simple test method

1, a firewall blocking 1433
2, the firewall allows 1433
3, the data driver will not work

Original comment by gzw13...@gmail.com on 4 Jun 2015 at 9:29

GoogleCodeExporter commented 9 years ago
To set this only cause problems
Db.SetMaxIdleConns(1) //It must be greater than 0

Original comment by gzw13...@gmail.com on 4 Jun 2015 at 10:46

GoogleCodeExporter commented 9 years ago
I am sorry but I don't understand what your problem is. Perhaps if you can 
provide small program to demonstrate. Thank you.

Alex

Original comment by alex.bra...@gmail.com on 5 Jun 2015 at 2:20

GoogleCodeExporter commented 9 years ago
Thank you so much for taking the time point of view.
I'm sorry, my limited English proficiency
Found applet has been uploaded

windows 2012    
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) 

Original comment by gzw13...@gmail.com on 5 Jun 2015 at 4:31

Attachments:

GoogleCodeExporter commented 9 years ago
I can see the problem now. The driver needs to return 
database/sql/driver.ErrBadConn if connection is broken. I should fix that. 
Thank you for the test.

Alex

Original comment by alex.bra...@gmail.com on 5 Jun 2015 at 6:56

GoogleCodeExporter commented 9 years ago
gzw13999 please see if https://codereview.appspot.com/247980043/ fixes your 
problem.

Alex

Original comment by alex.bra...@gmail.com on 12 Jun 2015 at 7:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 1852117f0a03.

Original comment by alex.bra...@gmail.com on 15 Jun 2015 at 5:26