Thanks Danny. That did the trick. I think I had thought about putting the variables in the execute statement, but I didn't run across any examples. I'll need to read the DB API 2.0 docs some more.
Mike Danny Yoo wrote: >>Thankfully, you don't have to change much to fix the formatting bug. The >>only thing you'll need to do is let the SQL cursor do the value formatting >>for you: >> >>###### >>sqlStatement = """INSERT INTO images (image) >> VALUES (%s); >>cur.execute(sqlStatement, (data_obj)) >>###### > > > > Hi Mike, > > > Gaaa. I was a little sloppy there, wasn't I? Let me fix that: > > ###### > sqlStatement = """INSERT INTO images (image) > VALUES (%s);""" > cur.execute(sqlStatement, (data_obj,)) > ###### > > > My apologies! > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor