2 Feb
2005
2 Feb
'05
10:39 p.m.
You might want to do something like what's below and call GetDBC() upon every EM entry. It will reuse the current connection if it's present, otherwise it opens a new one. kisSQL is my own module that wraps around mysql. What drove me crazy for a bit and resulted in tons of hung db conenctions was I stupidly a forgot to put a delete method in my kisSQL class. ( def __del__(self):) to actually close the connections, as CloseDBC() would not always get called. ------------------- def GetDBC (): import kisSQL global sql if 'sql' not in globals(): sql = kisSQL.kisSQL(db=dbname,user=dbuser,passwd=dbpass) def CloseDBC (): global sql if 'sql' in globals(): del(sql)