im not sure if the "use" statement is really valid to use on a MySQLDB
connection.  alternatively, if it *does* work, since you are not using
explicit connections, its possible that the "use" works on the
particular connection that you happen to pull from the pool, but your
subsequent statement is on a different pooled connection which did not
have the "use" statement executed (youd be pulling a second connection
because the result from the first insert has not yet been garbage
collected, and the connection is still pending).

cant you just connect to the correct database directly with your
create_engine url ?

if not, at the very least you'd have to specify a custom connect
function to your engine which does the "use" on every new connection
created:

 def connect():
      conn = mysqldb.connect(**kwargs)
      conn.cursor().execute("use mydb")
      return conn

engine = create_engine('mysql://', creator=connect)


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to