r-dbi / odbc

Connect to ODBC databases (using the DBI interface)
https://odbc.r-dbi.org/
Other
387 stars 107 forks source link

nanodbc: more frugal with calls to SQLDescribeParam #816

Closed detule closed 2 months ago

detule commented 2 months ago

Fixes https://github.com/r-dbi/odbc/issues/814

It seems the SIMBA/Professional MSSQL driver does not faithfully return correct data when invoking SQLDescribeParam multiple times for the same index.

That aside, the commit below should be considered a performance improvement when writing large data sets and with a batch_size a fraction of the total number of rows as the API call is called only once for each column ( previously once per-column-per-batch ).

detule commented 2 months ago

Can we capture this problem/fix with a test?

We can write an easy test but it will only be effective once we have a pipeline for the PRO drivers. I'll make sure to do that once we have that in place.