On Fri, Mar 7, 2008 at 10:21 AM, Brian Blais <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am trying to insert rows into a sqlite database, and am getting the
> error: SQL logic error or missing database. This only happens with
> inserts, not selects, which are working fine.
>
> I am not sure how to debug this one. The insert command I have is:
>
> web.insert('comments',who=user._id_,
> comment=comment,
> filename=pic.filename,
> family_id=pic.family_id,
> person_id=pic.person_id,
> created=datetime.now(),
> picture=pic._id_)
By default, web.py tries to get the id column after the insert. If there is
no id column, seqname=False must be passed as argument to insert.
web.insert('comments', seqname=False, ....)
You can't figure that out from the error message. Here is bug for improving
this.
https://bugs.edge.launchpad.net/webpy/+bug/178465
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---