Closed lumpi101 closed 7 months ago
Thanks for the report and apologies for the lengthy delay in getting back to you. I have just pushed changes that ensure that type assignment is deferred until the last row of data that is being processed and added a relevant test case.
Thanks. I cannot test it anymore on my side but I guess it is solved now. So I close this issue. If there are still problems for anyone regarding this issue, feel free to reopen.
We experience an Error when inserting float / decimal Data using executemany() if the first line(s) contains NaN, converted to None. The error does not occur with NaNs in other rows, if the frst row contains a number. Also working without error is the insertion of NaNs only for the numeric column.
Example:
This is tested with ceODBC version 3.0 and a mssql database. At first glance it seems that the datatypes are inferenced by the first row of the insert values and None/NULL is interpreted as string and subsequent values of other types cause exceptions. So this problem may also exist for types other than numeric.