try:
    t.commit()
except:
    print 'Holy cow, this database is lame'


On 6/8/07, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> is there a way to determine if the underlying MySQL DB is able to perform
> a commit() operation? The following code fails (likely because the
> underlying MySQL db is pretty old, V3ish).
>
> Andreas
> --------------
>
> >>> dsn = 'mysql://....'
> >>> e = create_engine(dsn)
> >>> c=e.connect()
> >>> t = c.begin()
> >>> t.commit()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 675,
> in commit
>   File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 488,
> in _commit_impl
> sqlalchemy.exceptions.SQLError: (ProgrammingError) (1064, "You have an
> error in your SQL syntax near 'commit' at line 1") None None
>
> --
> ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
> Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
> Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
> Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
> ------------------------------------------------------------------------
> E-Publishing, Python, Zope & Plone development, Consulting
>
>

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