From 96209a12486df72ab0b2285441de8505489e26b3 Mon Sep 17 00:00:00 2001 From: Brad Allen Date: Mon, 15 Mar 2010 11:39:03 -0600 Subject: [PATCH] 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. --- lib/sqlalchemy/connectors/mxodbc.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.47.3