Re: Python and passwords
Charles Wilt <[email protected]>
| Newsgroups | gmane.comp.hardware.ibm.midrange |
|---|---|
| Message-ID | <CAJ=Tnc6FWX0=ykgES5Ccg_nmk2oD3edbfmzaX1fBtdnTt6UZVw@mail.gmail.com> |
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 <[email protected]> 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 <[email protected]> On Behalf Of
> Richard Schoen
> Sent: Monday, May 11, 2026 2:52 PM
> To: [email protected]
> 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: [email protected]
>
> ------------------------------
>
> message: 2
> date: Mon, 11 May 2026 17:38:50 +0000
> from: Jack Woehr via MIDRANGE-L <[email protected]>
> 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: [email protected] To subscribe,
> unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/midrange-l
> or email: [email protected]
> Before posting, please take a moment to review the archives at
> https://archive.midrange.com/midrange-l.
>
> Please contact [email protected] for any subscription related
> questions.
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/midrange-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/midrange-l.
>
> Please contact [email protected] for any subscription related
> questions.
>
>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact [email protected] for any subscription related questions.