You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I execute multiple statements, and there is an error in another dataset than the first, no exception is raised.
To reproduce this on MS SQL,
create a table containing a column of type int. (e.g my_table)
Connect and execute this this
statement='''INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (1);INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (2);INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (100000000000);'''result=cursor.execute(statement)
The last statement is invalid and should raise the following error
DataError: ('22003', '[22003] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Arithmetic overflow error converting expression to data type int. (8115) (SQLExecDirectW)')
But no error is raised.
Now, if the statements would have occured in a different order, with the last statement first, the error above is raised
statement='''INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (100000000000);INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (2);INSERT INTO eu_modeldb_l.ship_tracking.overflow_test VALUES (1);'''result=cursor.execute(statement)
The error is reproduced in pyodbc 3.0.10 on a linux machine (using an anaconda environment)
The text was updated successfully, but these errors were encountered:
When I execute multiple statements, and there is an error in another dataset than the first, no exception is raised.
To reproduce this on MS SQL,
The last statement is invalid and should raise the following error
But no error is raised.
Now, if the statements would have occured in a different order, with the last statement first, the error above is raised
The error is reproduced in pyodbc 3.0.10 on a linux machine (using an anaconda environment)
The text was updated successfully, but these errors were encountered: