Fernando Alberto Velasquez wrote:
Hi

I have a problem Connecting Python with sapdbapi on Linux :

-----------------------------------------------------------------
import sapdbapi

dbConnect = sapdbapi.connect ('dba', 'xxxxxxx', 'TST', 'goku', '')
[...]
Show This Error :


Exception exceptions.AttributeError: '_Connection__connection' in <method
Connection.close of Connection instance at 80f1158> ignored
Traceback (innermost last):
  File "./sappy.py", line 6, in ?
    dbConnect = sapdbapi.connect ('dba', 'xxxxxxxx', 'TST', 'goku', '')
TypeError: too many arguments; expected 5, got 6
There is a difference between the connect of sapdb and sapdbapi:
- sapdb.connect has a fifth string parameter for connect options: .connect ( ..., 'sqlmode=oracle&timeout=60')
- sapdbapi.connect lets you pass connect options as keyword arguments:
.connect ( ..., sqlmode = 'oracle', timeout = '60')

The user name is case sensitive, so you'll probably have to use 'DBA' instead.

Daniel Dittmar

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



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to