Nelson C.

Results 12 comments of Nelson C.

I didn't at first but tried your suggestion using the following map: ``` csr.setinputsizes([ (pyodbc.SQL_VARCHAR, 128, 0) , (pyodbc.SQL_VARCHAR, 64, 0) , (pyodbc.SQL_VARCHAR, 64, 0) , (pyodbc.SQL_VARCHAR, 64, 0) ,...

Yes. ``` with pyodbc.connect(cnn_str) as cnn: with cnn.cursor() as csr: csr.fast_executemany = True csr.executemany(sql, data) ``` I'm also using the latest ODBC Driver 17 for SQL Server (but previously was...

I could provide you the serialized object of the list I'm inserting in the SQL Server and the table structure, if this would help.

Sure. Here they are. I'm sending you two log files generated by a sample of 1000 records. - In the file "SQL_with_None", I inserted the rows of the dataset as...

Anything else I can provide that would you help your assessment? I've spend half and hour looking at the tracing files but they are beyond my ability to debug. If...

Yes, it does ignore. I used the following code: with pyodbc.connect(cnn_str) as cnn: with cnn.cursor() as csr: csr.setinputsizes([ (pyodbc.SQL_VARCHAR, 128, 0) , (pyodbc.SQL_VARCHAR, 64, 0) , (pyodbc.SQL_VARCHAR, 64, 0) ,...

Here is the log with setinputsizes (as I described above). Insertion of 999 records. [SQL.zip](https://github.com/mkleehammer/pyodbc/files/4548450/SQL.zip)

@v-chojas One question: why we don't get any problems only if the first row has no Nones? If the second row has no Nones, it still impacts the entire insert...

Since pyODBC can't bind None because SQL Server has different types of NULLs for different types of fields, the alternative would be to tell pyodbc beforehand what the type is....

Yes, I tested and confirm that your code didn't have any of the issues even though the first line has a 'None' Maybe there's an additional hidden criteria that is...