--- ZSQLExtend/ZSQLExtend.py 2005/10/12 19:36:56 1.68 +++ ZSQLExtend/ZSQLExtend.py 2005/10/14 15:08:18 1.69 @@ -359,7 +359,8 @@ class ZSQLExtendFolder(Folder,Persistent query=self.query if (hasattr(self,"_v_searchSQL") and (self._v_searchSQL == None)) or (not hasattr(self,"_v_searchSQL")): - self._v_searchSQL=Shared.DC.ZRDB.DA.DA("_v_searchSQL","_v_searchSQL",self.connection_id,"var","") + + self._v_searchSQL=Shared.DC.ZRDB.DA.DA("_v_searchSQL","_v_searchSQL",self.getConnectionObj().getId(),"var","") self._v_searchSQL.max_rows_=max_rows try: @@ -368,7 +369,7 @@ class ZSQLExtendFolder(Folder,Persistent except : if sys.exc_info()[0]=="Database Error": try: - getattr(self,self.connection_id).manage_open_connection() + self.getConnectionObj().manage_open_connection() except: zLOG.LOG("ZSQLSimpleSearch",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) else: @@ -379,10 +380,14 @@ class ZSQLExtendFolder(Folder,Persistent except : if sys.exc_info()[0]=="Database Error": try: - getattr(self,self.connection_id).manage_open_connection() + self.getConnectionObj().manage_open_connection() except: zLOG.LOG("ZSQLSimpleSearch",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) + def getConnectionObj(self): + if hasattr(self,'connection_id'): + return getattr(self,self.connection_id) + def ZSQLSimpleSearch2(self,query=None): """ returrn SQLSearch""" @@ -503,7 +508,7 @@ class ZSQLExtendFolder(Folder,Persistent changeString=string.join(changeList,",") queryString="UPDATE %s SET %s WHERE %s"%(table,changeString,identify) - + self.ZSQLSimpleSearch(queryString)