From: Brad Allen Date: Mon, 15 Mar 2010 17:39:03 +0000 (-0600) Subject: using executemany instead of executedirect, which passes more tests than with plain... X-Git-Tag: rel_0_6beta2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96209a12486df72ab0b2285441de8505489e26b3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git using executemany instead of executedirect, which passes more tests than with plain execute. Later we need to define logic to determine when to call the normal execute. --- diff --git a/lib/sqlalchemy/connectors/mxodbc.py b/lib/sqlalchemy/connectors/mxodbc.py index b5747117f7..de9638151f 100644 --- a/lib/sqlalchemy/connectors/mxodbc.py +++ b/lib/sqlalchemy/connectors/mxodbc.py @@ -82,11 +82,8 @@ class MxODBCConnector(Connector): return tuple(version) def do_execute(self, cursor, statement, parameters, context=None): - # temporary hack to pass tests until the a better solution is understood - try: - cursor.execute(statement, tuple(parameters)) - except InterfaceError: - cursor.executedirect(statement, tuple(parameters)) + cursor.executedirect(statement, tuple(parameters)) + def error_handler(connection, cursor, errorclass, errorvalue): @@ -99,5 +96,6 @@ def error_handler(connection, cursor, errorclass, errorvalue): category=errorclass, stacklevel=2) else: + #import pdb; pdb.set_trace() raise errorclass, errorvalue