version 1.68, 2005/10/12 19:36:56
|
version 1.69, 2005/10/14 15:08:18
|
Line 359 class ZSQLExtendFolder(Folder,Persistent
|
Line 359 class ZSQLExtendFolder(Folder,Persistent
|
query=self.query |
query=self.query |
|
|
if (hasattr(self,"_v_searchSQL") and (self._v_searchSQL == None)) or (not hasattr(self,"_v_searchSQL")): |
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","<dtml-var var>") |
|
|
self._v_searchSQL=Shared.DC.ZRDB.DA.DA("_v_searchSQL","_v_searchSQL",self.getConnectionObj().getId(),"var","<dtml-var var>") |
|
|
self._v_searchSQL.max_rows_=max_rows |
self._v_searchSQL.max_rows_=max_rows |
try: |
try: |
Line 368 class ZSQLExtendFolder(Folder,Persistent
|
Line 369 class ZSQLExtendFolder(Folder,Persistent
|
except : |
except : |
if sys.exc_info()[0]=="Database Error": |
if sys.exc_info()[0]=="Database Error": |
try: |
try: |
getattr(self,self.connection_id).manage_open_connection() |
self.getConnectionObj().manage_open_connection() |
except: |
except: |
zLOG.LOG("ZSQLSimpleSearch",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) |
zLOG.LOG("ZSQLSimpleSearch",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) |
else: |
else: |
Line 379 class ZSQLExtendFolder(Folder,Persistent
|
Line 380 class ZSQLExtendFolder(Folder,Persistent
|
except : |
except : |
if sys.exc_info()[0]=="Database Error": |
if sys.exc_info()[0]=="Database Error": |
try: |
try: |
getattr(self,self.connection_id).manage_open_connection() |
self.getConnectionObj().manage_open_connection() |
except: |
except: |
zLOG.LOG("ZSQLSimpleSearch",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) |
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): |
def ZSQLSimpleSearch2(self,query=None): |
""" returrn SQLSearch""" |
""" returrn SQLSearch""" |