Unable to close due to unfinalised statements error msg

"jim roush" <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
I'm geting the following error message shown below.  The relevant section of
code follows that.  Anyone have any ideas?


Traceback (most recent call last):
  File "C:\markets\source\QuantScan\test.py", line 255, in <module>
    db.close()
sqlite3.OperationalError: Unable to close due to unfinalised statements


    # update ROC table in db
    print '\nupdate ROC table in db...\n'
    cur = db.cursor()
    cur.execute("delete from subind_ROC")

    for row in range(0, num_of_subinds):
        (subind, si_ROC_10, si_ROC_10_1, si_ROC_10_2, si_ROC_20,
si_ROC_20_1, \
            si_ROC_20_2, si_ROC_30, si_ROC_30_1, si_ROC_30_2) = si_ROC[row]

        cur.execute("INSERT INTO subind_ROC (subind, ROC_10, ROC_10_1, \
            ROC_10_2, ROC_20, ROC_20_1, ROC_20_2, ROC_30, ROC_30_1, \
            ROC_30_2) Values (?,?,?,?,?,?,?,?,?,?)", \
            (subind, si_ROC_10, si_ROC_10_1, si_ROC_10_2, si_ROC_20, \
            si_ROC_20_1, si_ROC_20_2, si_ROC_30, si_ROC_30_1, si_ROC_30_2))

    top_25()

    cur.close()
    db.commit()
    db.close()

_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.