[Python-checkins] r56010 - python/branches/release25-maint/Doc/lib/libsqlite3.tex

neal.norwitz python-checkins at python.org
Sun Jun 17 20:49:43 CEST 2007


Author: neal.norwitz
Date: Sun Jun 17 20:49:42 2007
New Revision: 56010

Modified:
   python/branches/release25-maint/Doc/lib/libsqlite3.tex
Log:
SF #1738670, make example in doc work

Modified: python/branches/release25-maint/Doc/lib/libsqlite3.tex
==============================================================================
--- python/branches/release25-maint/Doc/lib/libsqlite3.tex	(original)
+++ python/branches/release25-maint/Doc/lib/libsqlite3.tex	Sun Jun 17 20:49:42 2007
@@ -42,6 +42,12 @@
 # Insert a row of data
 c.execute("""insert into stocks
           values ('2006-01-05','BUY','RHAT',100,35.14)""")
+
+# Save (commit) the changes
+conn.commit()
+
+# We can also close the cursor if we are done with it
+c.close()
 \end{verbatim}    
 
 Usually your SQL operations will need to use values from Python


More information about the Python-checkins mailing list