From: Neal Norwitz Date: Sun, 17 Jun 2007 18:48:32 +0000 (+0000) Subject: SF #1738670, make example in doc work X-Git-Tag: v2.6a1~1601 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2eb4cba1ac122e1ac18c997864bb8c959638f05;p=python SF #1738670, make example in doc work --- diff --git a/Doc/lib/libsqlite3.tex b/Doc/lib/libsqlite3.tex index 19eed7e460..a7a0e94266 100644 --- a/Doc/lib/libsqlite3.tex +++ b/Doc/lib/libsqlite3.tex @@ -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