yuzx wrote:

i try to connect to db2 use python,i find it on python-db2 doc:

        $ python
        >>> import DB2
        >>> conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='ibmdb2')
        >>> curs = conn.cursor()

but i don't know about dsn,

It's the host name. In a former project (using module DB2 together with 'IBM DB2 Connect' to access OS/390 database via TCP/IP) I had to invoke a special catalog db2 script before being able to use the host name.


Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to