Re: Problems connecting to SAPDB 7.4 with python (sapdb.sql)

Daniel Dittmar <[email protected]> Sat, 13 Sep 2003 15:31:43 +0200
Newsgroups gmane.comp.db.sapdb.general
Organization SAP AG
Message-ID <[email protected]>
Hermann Himmelbauer wrote:
> Hi,
> I have a (simple) problem - I cannot connect to SAPDB 7.4 with the python API 
> (sapdb.sql). It tells me that my user name/password combination is false but 
> they are, as I can connect to SAPDB via WebSQL with this combination. Here is 
> what I do:
> 
>>>>import sapdb.sql
> 
> /opt/sapdb/interfaces/python/misc/sapdb/sql.py:28: RuntimeWarning: Python C 
> API version mismatch for module sql: This Python has API version 1011, module 
> sql has version 1007.
>   from pythondef.sql import *
> 
> ------------ snip ---------------
> 
> This Runtime Warning is nothing to be worried of, isn't it?

You can download a package covering Python 1.5 to 2.3 from 
ftp://ftp.sap.com/pub/sapdb/bin/linux/sapdb-python-linux-i386-7.4.03.12a.tgz.

>>>>session = sapdb.sql.connect('max','meier','kandb')
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> sql.SQLError: sql.SQLError: [-4008] (at 1) Unknown user name/password 
> combination

Make sure that you specify the user name case sensitive, which in most 
cases means all upper case.

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org