problem getting started with pyDB2

Discussion in 'Python' started by jimburton, Jan 23, 2006.

  1. jimburton

    jimburton Guest

    Hi, I'm using python 2.4, DB2 8.1 (with development libraries) on
    ubuntu linux 5.10. I installed PyDB2 1.1 but when I try to connect to
    any database I've got this:

    >>> import DB2
    >>> conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='secret')

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.4/site-packages/DB2.py", line 271, in __init__
    self._db = _db2.connect(*args, **kwargs)
    _db2.DatabaseError: ('I', -1, 'Invalid Handle')
    >>>


    After installing pydb2 I got errors about the missing file libdb2.so.1
    so I copied this file from /opt/IBM/db2/V8.1/lib into /usr/lib - am I
    now missing other libs? If so how do I let python know about the db2
    libs?

    Thanks!
     
    jimburton, Jan 23, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin
    Replies:
    0
    Views:
    783
    ALuPin
    Sep 21, 2004
  2. Stuart Bell
    Replies:
    0
    Views:
    354
    Stuart Bell
    Jan 18, 2004
  3. vj
    Replies:
    9
    Views:
    1,144
    Scott David Daniels
    Sep 21, 2005
  4. Tina
    Replies:
    2
    Views:
    1,437
    =?Utf-8?B?a21vNTc5OQ==?=
    Sep 13, 2006
  5. Jake Barnes
    Replies:
    2
    Views:
    312
Loading...

Share This Page