Commit 1b43274d authored by Raymond Hettinger's avatar Raymond Hettinger

Show how to close a connection

parent a4fd0dc5
......@@ -42,8 +42,9 @@ and call its :meth:`~Cursor.execute` method to perform SQL commands::
# Save (commit) the changes
conn.commit()
# We can also close the cursor if we are done with it
c.close()
# We can also close the connection if we are done with it.
# Just be sure any changes have been committed or they will be lost.
conn.close()
The data you've saved is persistent and is available in subsequent sessions::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment