× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I believe the QSH issue you are hitting is due to us now building against
readline or ncurses. It causes weird issues in QSH because both are trying
to do line buffering.

As to the connection options, the first argument to connect is a DSN
string (like ODBC expects), so passing just "*LOCAL" won't work, but you
can pass it to the database parameter. Here's a couple different examples:

import ibm_db_dbi as db2

# *LOCAL w/ myuser
conn = db2.connect(user="myuser", password="Passw0rd")

# MyRDB w/ current user
conn = db2.connect(database="MyRDB")

# Same as above, but using connection string
conn = db2.connect("DATABASE=*LOCAL;UID=myuser;PWD=Passw0rd")
conn = db2.connect("DATABASE=MyRDB")


If you create a server authentication entry with ADDSVRAUTE, you can also
connect to a remote database without specifying a username and password.

There's some Python examples over at
[1]https://github.com/Club-Seiden/python-for-IBM-i-examples. We're working
on updating them for the new yum version of Python and trying to add some
more as well.

References

Visible links
1. https://github.com/Club-Seiden/python-for-IBM-i-examples

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.