Closed GoogleCodeExporter closed 9 years ago
Unfortunately this is by design since ODBC is client/server. Databases don't
typically notify the clients, so there is no way for pyodbc to know.
What database are you using? If there is way to find out, it seems reasonable
to add
a flag or method that checks.
You didn't mention your operating system. If you are using ODBC on Windows,
using
connection pooling usually fixes this since a lot of drivers will check under
the covers.
If not, you'll need your manual connection pool to perform a quick test before
handing out the connection. I know SQL Server has a very fast stored procedure
the
driver uses under the covers (xp_reset I think). I've done this with manual
connection pools on Linux. (Also, if you are using PostgreSQL for a large
website/server, consider using pgbounce. I've heard a lot of good things about
it.)
Original comment by mkleehammer
on 14 Aug 2009 at 2:06
To clarify:
1) This is using a python client connecting to Netezza via the linux ODBC
library;
client is running on linux.
So this is a bit bleeding edge.
Original comment by gbron...@gmail.com
on 11 Nov 2009 at 9:57
I'm going to have to close this since it isn't actually a pyodbc issue.
I hate to do so without finding something helpful for you, but I haven't been
able to. Netezza isn't real
forthcoming with their documentation.
I do recommend bringing it up in the discussion group, though.
Original comment by mkleehammer
on 31 Dec 2009 at 6:59
Original comment by mkleehammer
on 21 Nov 2010 at 4:43
Original issue reported on code.google.com by
gbron...@gmail.com
on 13 Aug 2009 at 2:58