[pysqlite] PySqlite DELETE problem.....
Peter Schmidt <peter-GAua1inxoK4cdDaqD4Z/[email protected]> Tue, 30 Dec 2008 18:04:20 +0100
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <1230656660.23570.2.camel@psm-laptop> |
Hi guys. Have been struggling the best part of this Sunday trying to delete a record from a table - embarassing !. Executing the exact same SQL statement from the shell works fine ! I guess I have gone blind on my error - will be really grateful for a quick review by a more competent person. Here is the code : #!/usr/bin/python import sqlite3 as lite LP = "/home/psm/Documents/It/Project/" con = lite.connect(LP +'psm.db') cur = con.cursor() statement = "DELETE from 'User' WHERE 'Id' = 'di'" cur.execute(statement) con.commit cur.close() con.close() The table "User" rests in a db named "psm.db" The structure of table "User" in "psm.db" is : Id : text Name : text pw : text Type : text Thanks in advance ! :-) Peter _______________________________________________ list-pysqlite mailing list list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite