Re: DBApi Question with MySQL

2007-12-12 Thread Paul McNett
Hans Müller wrote: > Hi, > > I'd like to modify some tables in a database in one transaction. > This approach doesn't work: > > import MySQLdb > > con = MySQLdb.connect("servernam", user = "username", passwd = "verysecret, > db = "test", use_unicode = True, charset = "utf8") > > cursor = con.

Re: DBApi Question with MySQL

2007-12-12 Thread Jeff McNeil
Which storage engine are you using? My assumption is that you're using standard MyISAM tables, which will not support what you're trying to do. If you run the code below against MySQL tables created using InnoDB, it should work as expected. See http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-tra

DBApi Question with MySQL

2007-12-12 Thread Hans Müller
Hi, I'd like to modify some tables in a database in one transaction. This approach doesn't work: import MySQLdb con = MySQLdb.connect("servernam", user = "username", passwd = "verysecret, db = "test", use_unicode = True, charset = "utf8") cursor = con.cursor() con.begin() cursor.execute("del