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. Advertisements

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:
    939
    ALuPin
    Sep 21, 2004
  2. Ted R
    Replies:
    3
    Views:
    1,025
    Rob Young
    Oct 23, 2004
  3. Steve C. Orr, MCSD

    Re: Getting started with Sessions?

    Steve C. Orr, MCSD, Aug 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    435
    Michelle A.
    Aug 21, 2003
  4. Kent P. Iler
    Replies:
    2
    Views:
    635
    Kent P. Iler
    Sep 18, 2003
  5. Stuart Bell
    Replies:
    0
    Views:
    423
    Stuart Bell
    Jan 18, 2004
  6. vj
    Replies:
    9
    Views:
    1,268
    Scott David Daniels
    Sep 21, 2005
  7. Tina
    Replies:
    2
    Views:
    1,537
    =?Utf-8?B?a21vNTc5OQ==?=
    Sep 13, 2006
  8. Jake Barnes
    Replies:
    2
    Views:
    532
Loading...