This question is more about the "why". When you specify DRIVER={SQL Server Native Client 11.0}
in a connection string, varchar(max)
columns are returned blank. This issue seems to have carried on over the years, and some workarounds exist.
While it seems crazy that these issues still exist, a valid workaround, suggested by:
https://stackoverflow.com/a/33883901/4258124
is to change the connection string to use:
DRIVER={SQL Server}...(rest of connection string)
instead of:
DRIVER={SQL Server Native Client 11.0} ...(rest of connection string)
I've tried this, and it works, but my question is more about "why". If DRIVER={SQL SERVER}
is an older driver, how is it able to connect when I pass newer features like MultiSubnetFailover=Yes/True ?
I noticed I have installed (windows, from odbcad32.exe > Drivers) "ODBC Driver 11 for SQL Server" (MSODBCSQL11.DLL dated 2014) and "SQL Server" (SQLSRV32.DLL dated 2010).
In VBA or Python on Windows, does passing {SQL Server}
pick the newer of the above two ? Would any features be lost in using {SQL Server}
over {SQL Server Native Client 11.0}
, and if so, what would they be ? Is there a better workaround ?