]> granicus.if.org Git - python/commitdiff
SF #1738670, make example in doc work
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 17 Jun 2007 18:48:32 +0000 (18:48 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 17 Jun 2007 18:48:32 +0000 (18:48 +0000)
Doc/lib/libsqlite3.tex

index 19eed7e4604f4a0430af6eea5858591689b93e63..a7a0e94266c2fc218f546d2abd4f2be262f9dd33 100644 (file)
@@ -42,6 +42,12 @@ c.execute('''create table stocks
 # 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