|
Am 11.05.2026 um 21:18 schrieb Charles Wilt <charles.wilt@xxxxxxxxx>:
Gemini says
"When ibm_db sees None or an empty string for credentials during a *LOCAL
connection on IBM i, it defaults to the user profile of the process
currently running the Python script."
# Using the dbi wrapper
conn = ibm_db_dbi.connect(database='*LOCAL', user='*CURRENT',
password='*CURRENT')
# The underlying low-level call
ibm_db_resource = ibm_db.connect('*LOCAL', None, None)
HTH,
Charles
On Mon, May 11, 2026 at 1:05 PM Darren Strong <darren@xxxxxxxxx> wrote:--
Knowing it was possible gave me new searching hope, and I found an example
that used ibm_db_dbi instead of the current ibm_db I was using. Using
ibm_db_dbi can connect to the local database without issue, but ibm_db
requires explicit connection parms that I could not seem to get to use
current user profiles. Strange thing is that docs say that ibm_db_dbi is a
wrapper on top of ibm_db, so that implies its somehow using ibm_db the way
I'd like to.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Richard Schoen
Sent: Monday, May 11, 2026 2:52 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Python and passwords
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the content is safe.
Also as of Python 3.13 there is no IBM DB2 functionality, so going with
ODBC is the way to go.
That being said I didn't think the DB2 stuff required a user/password
either.
Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 2
date: Mon, 11 May 2026 17:38:50 +0000
from: Jack Woehr via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: Python and passwords
If you use ODBC your DSN definition in ~/.odbc.ini can include the lines:
System = *LOCAL
UserID = *CURRENT
Jack Woehr
Independent Consulting Programmer
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.