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



So I figured out my problem. I didn't have journaling turned on for my table. It makes sense, but I don't remember reading that requirement anywhere.

Some may ask why wouldn't you journal, no good reason really, we just aren't in the habit of journaling all internal only tables.

Anyway thought I would share in case anyone else encounters the same thing.

-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Adler
Sent: Tuesday, October 10, 2017 4:30 PM
To: opensource@xxxxxxxxxxxx
Subject: Re: [IBMiOSS] using ibm_db_dbi to block insert

The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.

As Aaron said, you need to commit your changes. PEP 249 requires that
autocommit be disabled by default. You can either call commit() on your
connection object:

conn = ibm_db_dbi.connect()
cursor = conn.cursor()
cursor.execute('delete from employee')

conn.commit()

or you can enable auto commit:

conn = ibm_db_dbi.connect(conn_options={ibm_db_dbi.SQL_ATTR_AUTOCOMMIT :
ibm_db_dbi.SQL_AUTOCOMMIT_ON})
cursor = conn.cursor()
cursor.execute('delete from employee')

See the documentation for more info.
[1]https://www.python.org/dev/peps/pep-0249/#commit

Kevin Adler
Software Development - PASE, Open Source, IBM i Access ODBC



----- Original message -----
From: Aaron Bartell <aaronbartell@xxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Cc:
Subject: Re: [IBMiOSS] using ibm_db_dbi to block insert
Date: Tue, Oct 10, 2017 4:17 PM

Check to make sure you have it either auto committing or are issuing an
SQL
commit.

Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces

On Tue, Oct 10, 2017 at 4:13 PM, Jeremy Meyer <JMeyer@xxxxxxxxxxxxx>
wrote:

> We just got ibm_db_dbi installed and I have been trying it out. I have
no
> issue retrieving information but cannot seem to be able to insert.
>
> Using cursor.executemany() I am trying to insert several rows. Table
is
> just a big list of tuples.
>
> cur.executemany('insert into lib.table
(LIBNAME,LIBTYPE,TO_LVL,TO_ENV,LIBAPP,MST_OWNER)
> values (?,?,?,?,?,?)',table)
>
> Rough idea of what Table looks like.
> <class 'list'>: [('LIBONE', 'DTA', Decimal('10'), 'SomeText', 'XXXX',
> 'NameasText '), ('LIBTWO', 'DTA', Decimal('10'), 'SomeText',
'XXXX',
> 'NameasText ')]
>
> So it executes the statement like it is successful, but I never get
any
> data inserted into my table. I haven't found any examples anywhere yet
> using ibm_db_dbi for inserting.
> NOTICE: This electronic mail message and any files transmitted with it
are
> intended
> exclusively for the individual or entity to which it is addressed. The
> message,
> together with any attachment, may contain confidential and/or
privileged
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or
> distribution
> is strictly prohibited. If you have received this message in error,
please
> immediately advise the sender by reply email and delete all copies.
> --
> This is the IBMi Open Source Roundtable (OpenSource) mailing list
> To post a message email: OpenSource@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
[2]https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=MoDEjINyy2UvJwnFnQRDTNMbYuAgRNMa7PlkGIrzy8w&e=
> or email: OpenSource-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at
[3]https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=W3ehaB19iZkOru_X2dBsm8vc7GYzwyytENFw-6MqBpw&e=.
>
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
[4]https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=MoDEjINyy2UvJwnFnQRDTNMbYuAgRNMa7PlkGIrzy8w&e=
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
[5]https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=W3ehaB19iZkOru_X2dBsm8vc7GYzwyytENFw-6MqBpw&e=.




References

Visible links
1. https://www.python.org/dev/peps/pep-0249/#commit
2. https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=MoDEjINyy2UvJwnFnQRDTNMbYuAgRNMa7PlkGIrzy8w&e=
3. https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=W3ehaB19iZkOru_X2dBsm8vc7GYzwyytENFw-6MqBpw&e=
4. https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=MoDEjINyy2UvJwnFnQRDTNMbYuAgRNMa7PlkGIrzy8w&e=
5. https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2aXRESXNvBGuLbIQEybCPNLc7OK0UqjwsZsoCq7Jz6o&m=KBp1XfevIJuPOMIZWDEw5qoEy5YmlU8iXwp-uH3fpY4&s=W3ehaB19iZkOru_X2dBsm8vc7GYzwyytENFw-6MqBpw&e=
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/opensource.

NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.


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.