Tagged Questions
2
votes
4answers
614 views
How to use IBM_DB with older versions of DB2?
I want to connect Python to DB2 version 9.1 using IBM DB2 ODBC Driver.
Following is my code to connect Python to DB2. This program is working in the later versions of IBM DB2.
import ibm_db
conn = ...
0
votes
2answers
57 views
Python-Mysql: Multiple attempts to connect - Best Practice
I have following database connection code, initially I didn't have the while loop for multiple attempts but then I thought its better that I do multiple attempts before really fail it. My question is, ...
1
vote
1answer
565 views
Closing a cx_Oracle Connection While Allowing for a Down Database
The following cx_Oracle code works fine when the database is up:
#!C:\Python27
import cx_Oracle
try:
conn = cx_Oracle.connect("scott/tiger@oracle")
try:
curs = conn.cursor()
...
0
votes
1answer
99 views
Python MySQLdb connection - when to open/close new connections?
I'm using a few apps running Tornado Web server which all connect to a MySql DB using mysqldb. When I spin up the server, it instantiates a DB class (below) which opens a connection to the DB. All ...
0
votes
0answers
22 views
ImportError: No localization support for language 'eng' in python
i am getting ImportError: No localization support for language 'eng' when using MySQL Connector Python.
My Traceback is as below.
Traceback (most recent call last):
File \"DB_Module.py\", line 151, ...