Problem w/ MySQLdb

Jerry Hill malaclypse2 at gmail.com
Tue Feb 15 16:21:47 EST 2011


On Tue, Feb 15, 2011 at 3:24 PM, Victor Subervi <victorsubervi at gmail.com> wrote:
> It builds the table but fails from the first insertion. Trying to insert
> using that code directly in MySQL does indeed work. Why?

In what way does it fail?  Does it give you a stack trace, and if so,
what does it say?  Does it create the table, but not populate any
data?  If that's the case, you probably need to call commit() after
you do your inserts.

I'm not familiar with the MySQLDB module in particular, but python
database adapters typically do not autocommit, unless you explicitly
ask for that behavior.

-- 
Jerry



More information about the Python-list mailing list