[Tutor] SQLite database not update correctly

Emmanuel Ruellan emmanuel.ruellan at laposte.net
Sun Nov 8 21:33:41 CET 2009


It's working fine now, but actually I didn't write exactly what you
suggested. The "commit" method belongs to the connection, not to the cursor.
Therefore, in my script it should be conn.commit().

On Sun, Nov 8, 2009 at 9:15 PM, Che M <pine508 at hotmail.com> wrote:

>
> > I've got a functions that should update an sqlite database, among other
> things.  However
> >  the database doesn't get updated. When used in isolation, the update
> statement works
> > fine. What am I doing wrong?
>
> > Below is the function. The whole script can be found at
> http://pastebin.com/m53978ffa
>
> I think it's because you don't commit the changes to the database.  Use
> c.commit() after
> you make the changes.
>
>
> <http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009>
> ------------------------------
> Find the right PC with Windows 7 and Windows Live. Learn more.<http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091108/c9875207/attachment.htm>


More information about the Tutor mailing list