SAP DB and Python

Pieter Claerhout Pieter.Claerhout at Creo.com
Thu Nov 27 08:56:36 EST 2003


If you download the SAP DB Python modules, under the sapdb package
directory, you will find different subfolders called python15, python20,
python21, python22 and python23. To get it working, you should rename the
folder that corresponds to your python to pythondef. Then, try to reimport
the sapdb package and all should be working fine.

My sapdb package directory structure looks as follows:

sapdb
sapdb\__init__.py
sapdb\dbapi.py
sapdb\dbm.py
sapdb\loader.py
sapdb\sql.py
sapdb\pythondef\__init__.py
sapdb\pythondef\dbm.pyd
sapdb\pythondef\loader.pyd
sapdb\pythondef\sql.pyd

Cheers,


pieter

-----Original Message-----
From: Gandalf [mailto:gandalf at geochemsource.com] 
Sent: 27 November 2003 14:47
To: comp.lang.python
Subject: Re: SAP DB and Python


>
>
>> You can download the right binaries from their website. If you go to: 
>> http://www.sapdb.org/7.4/sap_db_downloads.htm
>>
>> At the bottom, you will see an row in the download table called
>> "Python".
>> That's the one you need.
>>
>> Cheers,
>>
>> pieter
>
Downloaded, installed.

 >>> from sapdb import dbapi
 >>> dbapi.connect
<class sapdb.dbapi.Connection at 0x00951D20>
 >>> conn = dbapi.connect('dba','dba','Demo')

Traceback (most recent call last):
  File "D:\Python\Projects\Test\test.py", line 2, in ?
    conn = dbapi.connect('dba','dba','Demo')
  File "D:\Python23\lib\sapdb\dbapi.py", line 102, in __init__
    database, host, configString)
  File "D:\Python23\lib\sapdb\dbapi.py", line 60, in wrapCall
    raise ProgrammingError (err)
sapdb.dbapi.ProgrammingError: sql.SQLError: [-8000] (at 1) Message not 
available
Exception exceptions.AttributeError: "Connection instance has no 
attribute '_Connection__connection'" in <bound method Connection.close 
of <sapdb.dbapi.Connection instance at 0x009498F0>> ignored


Any ideas?

   Laci 1.0




-- 
http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list