Connect Problem with DCOracle on Win32
Hello all, i managed to compile DCOracle for Win32 and I am able to connect to some Oracle 7.x databases around here. When I try to connect to a local 8I database : ## my program import DCOracle.ocidb import os #os.environ['ORACLE_HOME']='E:\\Oracle8i' #os.environ['TNS_ADMIN']='E:\\Oracle8i\\Network\\Admin' #os.environ['ORACLE_SID']='Test' os.system("set") co = DCOracle.Connect("scott/tiger@WS21375.xxxxx") I get the following traceback Traceback (innermost last): File "F:\DCOracle\Tests\Connect.py", line 7, in ? co = DCOracle.Connect("scott/tiger") File "F:\Python\DCOracle\ocidb.py", line 69, in __init__ self.__dict__['_d']=oci_.Connect(connection_string) OracleError: (12203, 'ORA-12203: TNS:Verbindung zum Ziel nicht m\366glich.\012') ORA-12203 is TNS:unable to connect to destination I don't believe that this is really a TNS-problem because one of the precompiler samples supplied with oracle works just fine from the sam command prompt. In the sourcecode ocidb.py is a hint that there should be another login format for oracle 8, but the module oci_8 mentioned there does not exist. ### from ocidb.py : class ocidb: "Oracle Database Connections" if oci_8 is None: def __init__(self, connection_string): "Open a database connection" self.__dict__['_d']=oci_.Connect(connection_string) else: def __init__(self, connection_string): "Open a database connection" # Waaa, O8 wants a different format. Waaa up, s = (split(connection_string, '@')+[''])[:2] u, p = (split(up, '/')+[''])[:2] sc=oci_8.Logon(u,p,s) self.__dict__['_d']=sc.lda() Has anyone managed to get this going ?? Many thanks for any hints Norbert Klamann
participants (1)
-
Norbert.Klamann@DENOTES.HENKEL.DE