[Zope] problem where using ZODBCDA

fbarsukow at fede.generali.fr fbarsukow at fede.generali.fr
Wed Nov 5 06:00:45 EST 2003


hi, 

i use ZODBCDA for connecting to a sybase 1.12 database.

i use it in this way :

## Script (Python) "RH_AppelSQL_script"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=laChaineSQL
##title=
##

REQUEST = context.REQUEST

# Fonction appelant la base de données :

lstResult = context.base_RH.manage_test(laChaineSQL)
return lstResult

and i call this script when i want to execute a SQL request or a stored 
procedure.

Nevertheless, sometimes i have a error due to a connection failure.
The more suprising is if i use the manage console for testing the 
connection , that's good .

zope version         : 2.1.2 
python version         : 2.1 


the error generating by my application is :




   (Object: shortcuts_box)
  File f:\Zope\IntranetLFC\Zope\lib\python\DocumentTemplate\DT_Let.py, 
line 142, in render
    (Object: isGestionRH="RH_Securite_Is_Gestion_RH_script()"
                        mois="ZopeTime().month()")
  File f:\Zope\IntranetLFC\Zope\lib\python\DocumentTemplate\DT_Util.py, 
line 205, in eval
    (Object: RH_Securite_Is_Gestion_RH_script())
    (Info: RH_Securite_Is_Gestion_RH_script)
  File <string>, line 2, in f
  File f:\Zope\IntranetLFC\Zope\lib\python\Shared\DC\Scripts\Bindings.py, 
line 322, in __call__
    (Object: RH_Securite_Is_Gestion_RH_script)
  File f:\Zope\IntranetLFC\Zope\lib\python\Shared\DC\Scripts\Bindings.py, 
line 342, in _bindAndExec
    (Object: RH_Securite_Is_Gestion_RH_script)
  File 
f:\Zope\IntranetLFC\Zope\lib\python\Products\CMFCore\FSPythonScript.py, 
line 153, in _exec
    (Object: RH_Securite_Is_Gestion_RH_script)
    (Info: ({'script': <FSPythonScript instance at 04AFF5E0>, 
'context': <PortalFolder instance at 04897EC0>, 'container': 
<CMFSite instance at 05963220>, 'traverse_subpath': []}, (), {}, 
None))
  File Script (Python), line 7, in RH_Securite_Is_Gestion_RH_script
  File f:\Zope\IntranetLFC\Zope\lib\python\Shared\DC\Scripts\Bindings.py, 
line 322, in __call__
    (Object: RH_AppelSQL_script)
  File f:\Zope\IntranetLFC\Zope\lib\python\Shared\DC\Scripts\Bindings.py, 
line 342, in _bindAndExec
    (Object: RH_AppelSQL_script)
  File 
f:\Zope\IntranetLFC\Zope\lib\python\Products\CMFCore\FSPythonScript.py, 
line 153, in _exec
    (Object: RH_AppelSQL_script)
    (Info: ({'script': <FSPythonScript instance at 04965B70>, 
'context': <PortalFolder instance at 04897EC0>, 'container': 
<CMFSite instance at 05963220>, 'traverse_subpath': []}, 
("select NOMBRE=count(LOGIN) from SECURITE  where LOGIN='fbarsukow' 
and ID_SERVICE=-2",), {}, None))
  File Script (Python), line 2, in RH_AppelSQL_script
  File f:\Zope\IntranetLFC\Zope\lib\python\Shared\DC\ZRDB\Connection.py, 
line 176, in manage_test
    (Object: base_RH)
  File 
c:\projets\projet~2\Divers\install_NT\Zope\lib\python\Products\ZODBCDA\db.py, 
line 176, in query
sql.error: ('S1000', 50, '[INTERSOLV][ODBC SQL Server driver][SQL 
Server]ct_cmd_alloc(): user api layer: external error: The connection has 
been marked dead.')

or " connection link error" 


so do you have any solution for a good catching of error and a mean for 
reconnect the database is the problem occurs?

regards, 

fabien Barsukow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031105/32c2e80a/attachment.html


More information about the Zope mailing list