Menu

Update silently fails

2010-04-06
2013-04-29
  • Arne Schwabe

    Arne Schwabe - 2010-04-06

    Hello,

    I am doing very simple update query on a table. If I check on the database later the change did not happen. If I try the same query in the sql studio it works. Select querys work too.

    The query in question is:

    cur.execute("UPDATE interfaces SET unpluggable='1' where interfaceid=15558 and nodeid=233")

    (I already remove the variables in my debugging)

     
  • A

    A - 2010-04-06

    connection.commit()  # you must call commit() to persist your data unless you set autocommit to True

     
  • Arne Schwabe

    Arne Schwabe - 2010-04-06

    Many thanks that did the tricks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.