-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi there,

I am creating a tool that should add data from an excel sheet into
mysql. i am using sqlalchmy 0.3
I want to be able to set the database in mysql at runtime.

what I do is sommething allong the following lines:

connectionstr = '%(engine)s%(user)s:%(pw)s' % self._connectioninfo
self._db_engine = create_engine(connectionstr)
self._db_engine.execute("use %s" % dbname) % 'dbname'

after that I can add a row to a selected table which I do with:

table.insert(record).execute()

where table is a table instance, record a dictonary with name:value pairs.

this works fine for the first record.

however the second record trows a "no database selected" error.

what could be the reason for this?
dos not a connection keep the knowledge what db is selected.

thanks
robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFdwl4GaryJ0T9kUYRAr3UAJ91f6+hs3JCnWEPKlQsPdSkfYiz7wCdFq0G
qCi939a3IPRwskb9MNsaCV8=
=PHY6
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
 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