DAL issue with w2p 1.91.6

18 views
Skip to first unread message

Michael Barrow

unread,
Mar 7, 2011, 11:27:45 PM3/7/11
to web2py
I'm running v1.91.6 and I try out a simple db.table.insert in the shell from the admin application and it works just fine. However, when the exact same code is in one of my controllers, an exception is generated because web2py is trying to cram some hunk of data into a column that's only 512 bytes.

Thoughts?

--
Michael Barrow
michael at barrow dot me
+1 (408) 782-4249

Michael Barrow

unread,
Mar 8, 2011, 1:04:42 AM3/8/11
to web2py
To follow up, I turned on query logging in the database and it looks like when the code runs in the controller, it's trying to do an insert for all of the columns in the table and not just the ones I specified in the db.table.insert(). Any suggestions as to where I can track down what's going on here?

pbreit

unread,
Mar 8, 2011, 1:07:26 AM3/8/11
to web...@googlegroups.com
Can you provide some code for us to look at?

Michael Barrow

unread,
Mar 8, 2011, 1:42:31 AM3/8/11
to web...@googlegroups.com
Yeah -- I'm a loser. Sorry about that. I tracked it down to something I had been attempting to use to automatically stamp record creation and modifications. Hindsight being 20/20, I realized that I'd not fully vetted the syntax and was attempting to cram a printed object where it didn't belong. Mea culpa for the interruption to your normal programming. :)

On Mon, Mar 7, 2011 at 10:07 PM, pbreit <pbreit...@gmail.com> wrote:
Can you provide some code for us to look at?



Reply all
Reply to author
Forward
0 new messages