[Zope-DB] DCOracle2

centershock@t-online.de centershock@t-online.de
Thu, 09 Jan 2003 18:48:39 +0100 (CET)


Ahoi People,

I got a problem with DCOracle2 Module... I want to connect to a Oracle
Database through an external Method! In a Python-Console my script runs
well but if I run it through an external Method I got the following
ERROR-MESSAGE -->

##########################################################
Error Type: AttributeError
Error Value: 'DCOracle2' module has no attribute 'connect'
##########################################################


My Python-Script looks like -->
##########################################################
def dco2_connect(uname='scott', passwd='tiger'):
  import DCOracle2
  db = DCOracle2.connect(uname, passwd, "orcl")
  if db:
   return 1
##########################################################


mark: I've seen the Method "connect" in the DCOracl2-Module, and test
the following Line in a Python-Console and it works....>
##########################################################
db = DCOracle2.dco2.connect('scott', 'tiger', "orcl")
##########################################################

that makes me wonder because the Module DCOracle2.py contains the
Function "connect" but its not available without .dco2. between!?! And
if I use this Line in my Zope-External-Method, it spitts the following
Message...
#########################################################################
Error Type: AttributeError
Error Value: 'DCOracle2' module has no attribute 'dco2'
#########################################################################

Hmm... If there's someone OutaSpace who knows this Problem please mail
me. Its very important for me to connect the DB over an external
Methode! Give peace and answers to all the NewBies....

oki, cYa